fix: restore executable permission on bin entries after tsc build#452
Merged
fix: restore executable permission on bin entries after tsc build#452
Conversation
tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes #446
jackwener
added a commit
to HzTTT/opencli
that referenced
this pull request
Mar 26, 2026
…ckwener#446) (jackwener#452) tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes jackwener#446
jackwener
added a commit
to hanxiao790/opencli
that referenced
this pull request
Mar 26, 2026
…ckwener#446) (jackwener#452) tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes jackwener#446
jackwener
added a commit
that referenced
this pull request
Mar 26, 2026
* fix(ci): include popup assets in extension release Copy popup assets into the packaged Chrome extension zip and validate that manifest-referenced files exist before publishing the artifact. Co-authored-by: Codex <noreply@openai.com> * fix: restore executable permission on bin entries after tsc build (#446) (#452) tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes #446 * fix: correct positional arg usage in tests (#449) * fix yahoo-finance quote e2e invocation * fix positional args in v2ex topic tests * fix(ci): script extension release packaging --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: jakevin <jakevingoo@gmail.com> Co-authored-by: pi-dal <hi@pi-dal.com>
jackwener
added a commit
to Xeron2000/opencli
that referenced
this pull request
Mar 26, 2026
* fix(ci): include popup assets in extension release Copy popup assets into the packaged Chrome extension zip and validate that manifest-referenced files exist before publishing the artifact. Co-authored-by: Codex <noreply@openai.com> * fix: restore executable permission on bin entries after tsc build (jackwener#446) (jackwener#452) tsc does not preserve the +x bit when compiling, so after clean-dist removes dist/ and tsc regenerates it, dist/main.js loses its executable permission. This causes 'Permission denied' when users run 'npm run build' in the installed directory. Fix: read bin entries from package.json at the end of build-manifest and chmod 0o755 them (skipped on Windows). Wrapped in try/catch so it never breaks the build. Closes jackwener#446 * fix: correct positional arg usage in tests (jackwener#449) * fix yahoo-finance quote e2e invocation * fix positional args in v2ex topic tests * fix(ci): script extension release packaging --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: jakevin <jakevingoo@gmail.com> Co-authored-by: pi-dal <hi@pi-dal.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
npm run buildcausesPermission deniedwhen runningopencliafterwards.Root cause: The build pipeline runs
clean-dist(deletes entiredist/), thentscregenerates all files — but TypeScript compiler does not set executable permissions on output files. Sodist/main.jsends up with-rw-r--r--(644) instead of-rwxr-xr-x(755).Fix
At the end of
build-manifest.tsmain()(the last step in the build pipeline), readbinentries frompackage.jsonandchmod 0o755them.process.platform !== 'win32')try/catch, never breaks the buildpackage.jsonbinfieldCloses #446