Skip to content

build/index.js missing execute permissions after tsc buildΒ #29

@johnlindquist

Description

@johnlindquist

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

  1. Clone the repository
  2. Run bun install && bun run build
  3. Run npm install -g .
  4. Try to run wt --version
  5. Observe permission denied error

Workaround

chmod +x $(npm root -g)/@johnlindquist/worktree/build/index.js

Suggested 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions