-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Description
Problem
After running tsc to build the project, the output file build/index.js does not have execute permissions. This causes the global installation to fail with:
(eval):1: permission denied: wt
Users must manually run chmod +x on the installed file to make the CLI work.
Expected Behavior
The build/index.js file should be executable after build, or the build/publish process should ensure it has the correct permissions.
Steps to Reproduce
- Clone the repository
- Run
bun install && bun run build - Run
npm install -g . - Try to run
wt --version - Observe permission denied error
Workaround
chmod +x $(npm root -g)/@johnlindquist/worktree/build/index.jsSuggested Fix
Add a postbuild script in package.json:
"postbuild": "chmod +x build/index.js"Or use a TypeScript compiler plugin that preserves/adds execute permissions.
Reactions are currently unavailable