Current status
Verified against main on 2026-08-28: pkgs/cli/package.json still contains the failing postinstall script. PR #612 has the correct minimal removal, but it is based on v0.13.3 and needs a current patch changeset and full CI before merge. Refresh or recreate that PR rather than redesigning the fix.
Description
The pgflow package's postinstall script fails on Windows, preventing installation via npm install pgflow or npx pgflow@latest install.
Steps to reproduce
- On Windows (PowerShell or cmd), run:
npx pgflow@latest install
- Or:
npm install -g pgflow@latest
Expected behavior
Installation completes successfully.
Actual behavior
Installation fails with:
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c chmod +x dist/index.js || true
npm error 'chmod' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error 'true' is not recognized as an internal or external command,
npm error operable program or batch file.
Root cause
The postinstall script runs chmod +x dist/index.js || true — Unix commands that don't exist on Windows.
Workaround
Install with scripts disabled, then run the CLI:
npm install pgflow@latest --ignore-scripts
npx pgflow install
Environment
- OS: Windows 10/11
- Node: v24.12.0 (also reproducible on other versions)
- npm: latest
0.15.1 release verification
This fix is part of the release tracked by #666. Add a patch changeset and one small permanent windows-latest package smoke workflow rather than a full Windows CI matrix.
The Windows job must:
- build the CLI;
- create its publishable tarball with
pnpm pack;
- install the tarball into a clean directory with lifecycle scripts enabled;
- run the npm-created
pgflow.cmd --version shim.
The job needs no Supabase, Docker, Atlas, or full CLI E2E suite. Current CI runs only on Ubuntu and invokes node dist/index.js directly, so it does not test npm installation or Windows shims.
Current status
Verified against
mainon 2026-08-28:pkgs/cli/package.jsonstill contains the failing postinstall script. PR #612 has the correct minimal removal, but it is based on v0.13.3 and needs a current patch changeset and full CI before merge. Refresh or recreate that PR rather than redesigning the fix.Description
The
pgflowpackage's postinstall script fails on Windows, preventing installation vianpm install pgflowornpx pgflow@latest install.Steps to reproduce
npx pgflow@latest installnpm install -g pgflow@latestExpected behavior
Installation completes successfully.
Actual behavior
Installation fails with:
Root cause
The postinstall script runs
chmod +x dist/index.js || true— Unix commands that don't exist on Windows.Workaround
Install with scripts disabled, then run the CLI:
Environment
0.15.1release verificationThis fix is part of the release tracked by #666. Add a patch changeset and one small permanent
windows-latestpackage smoke workflow rather than a full Windows CI matrix.The Windows job must:
pnpm pack;pgflow.cmd --versionshim.The job needs no Supabase, Docker, Atlas, or full CLI E2E suite. Current CI runs only on Ubuntu and invokes
node dist/index.jsdirectly, so it does not test npm installation or Windows shims.