Skip to content

fix(cli): remove Windows-breaking postinstall chmod - #669

Merged
jumski merged 2 commits into
mainfrom
issue-610-postinstall
Sep 4, 2026
Merged

fix(cli): remove Windows-breaking postinstall chmod#669
jumski merged 2 commits into
mainfrom
issue-610-postinstall

Conversation

@jumski

@jumski jumski commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The pgflow package's postinstall ran chmod +x dist/index.js || true. chmod and true do not exist in Windows cmd.exe, so npm install pgflow and npx pgflow@latest install failed with 'chmod' is not recognized as an internal or external command.
  • npm sets the executable bit on files declared in the bin field during install, so the script was redundant even on Unix. Removal is the whole fix.
  • Adds a permanent windows-latest smoke workflow as the regression test: build the CLI, pnpm pack, install the tarball into a clean directory with lifecycle scripts enabled, run the npm-created pgflow.cmd --version shim. The rest of CI runs on Ubuntu and invokes node dist/index.js directly, so npm installation and Windows shims were never exercised.
  • One pgflow patch changeset for the 0.15.1 release group (Release 0.15.1 — task lifecycle hardening #666).
  • Recreates the minimal removal from fix: remove postinstall chmod that breaks Windows npm install #612 against current main (fix: remove postinstall chmod that breaks Windows npm install #612 was based on v0.13.3).

Checks

  • pnpm nx build cli — pass
  • pnpm pack in pkgs/cli — tarball contains dist/, no postinstall in its package.json
  • CLI unit tests — 43/43 pass
  • prettier --check on all three touched files — pass
  • Windows smoke job runs in this PR's CI

Closes #610

The pgflow package's postinstall ran `chmod +x dist/index.js || true`.
`chmod` and `true` do not exist in Windows cmd.exe, so `npm install pgflow`
and `npx pgflow@latest install` failed with "'chmod' is not recognized as an
internal or external command" (#610).

npm sets the executable bit on files declared in the `bin` field during
install, so the script was redundant even on Unix and removal changes nothing
for Unix users.

Adds a permanent windows-latest smoke workflow as the regression test: build
the CLI, pnpm pack, install the tarball into a clean directory with lifecycle
scripts enabled, run the npm-created pgflow.cmd --version shim. The rest of CI
runs on Ubuntu and invokes node dist/index.js directly, so npm installation
and Windows shims were never exercised.

One pgflow patch changeset for the 0.15.1 release group (#666). Recreates the
minimal removal from #612 against current main.

## Checks

- pnpm nx build cli — pass
- pnpm pack in pkgs/cli — tarball contains dist/, no postinstall in its package.json
- cli unit tests — 43/43 pass
- prettier --check on all three touched files — pass

Closes #610
@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 54d696f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
pgflow Patch
@pgflow/client Patch
@pgflow/core Patch
@pgflow/dsl Patch
@pgflow/edge-worker Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

jumski commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud

nx-cloud Bot commented Sep 4, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 448970a

Command Status Duration Result
nx build cli ✅ Succeeded 6s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-09-04 20:41:53 UTC

The double-quoted path followed by --version made YAML parse the value as
a quoted scalar with trailing content; GitHub rejected the whole workflow at
load time (run 33916753681: 0 jobs). The path expands from RUNNER_TEMP which
has no spaces on GitHub-hosted runners, so the bare scalar is safe.

@jumski jumski left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good, if checks are green - please merge with gt, then remove the worktree and close this issue's herdr workspace

jumski commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 4, 8:50 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 4, 8:50 PM UTC: @jumski merged this pull request with Graphite.

@jumski
jumski merged commit 4ac87c9 into main Sep 4, 2026
28 of 29 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 4ac87c9817c53118841477f771c2ef5cae7c09de
  • View Logs

Deployed at: 2026-09-04T22:50:53+02:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: postinstall script fails on Windows

1 participant