Skip to content

ci: restore the execute bit on every native binary before publish - #125

Open
ChazUK wants to merge 1 commit into
KevinEdry:mainfrom
ChazUK:fix/native-binary-exec-bit
Open

ChazUK wants to merge 1 commit into
KevinEdry:mainfrom
ChazUK:fix/native-binary-exec-bit

Conversation

@ChazUK

@ChazUK ChazUK commented Oct 7, 2026 •

Copy link
Copy Markdown

Fixes #124.

actions/upload-artifact puts the build output into a zip file. The zip file does not keep the mode bits. Thus, each native binary arrives in the publish job with mode 644.

The verify step set +x again only on the x86_64 Linux binary, because the --help smoke test needs it. npm publish then released the other four binaries without the executable bit. On macOS and on arm64 Linux, the CLI fails with spawnSync ... EACCES.

This change moves chmod +x into the loop that is already in the workflow. Thus, all four Unix binaries are executable before the publish step. Windows does not use the mode bit, so this change does not touch the .exe file.

I checked the published tarballs for 2.9.1, 2.10.0, 2.12.0 and 2.13.0. In each tarball, only x86_64-unknown-linux-gnu/nestjs-trpc has mode 755.

actions/upload-artifact zips the build output, which drops file modes:
every file comes back from download-artifact as 644. The verify step
only ran chmod +x on the x86_64 Linux binary (so the --help smoke test
could run), and npm publish then packed the other four binaries without
the execute bit.

On macOS and arm64 Linux, `nestjs-trpc generate` fails with:

  Failed to execute nestjs-trpc CLI: spawnSync .../native/aarch64-apple-darwin/nestjs-trpc EACCES

Every tarball from at least 2.9.1 through 2.13.0 has this shape; only
x86_64-unknown-linux-gnu/nestjs-trpc is 755.

Move the chmod into the loop so all four Unix binaries are executable
before the package is published. Windows does not use the mode bit.
@vercel

vercel Bot commented Oct 7, 2026

Copy link
Copy Markdown

@ChazUK is attempting to deploy a commit to the Kevin's Projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

CLI binaries are published without the execute bit (EACCES on macOS / arm64 Linux)

1 participant