Skip to content

Commit 51a1fdf

Browse files
arbrandesclaude
andcommitted
fix: ensure bin entry points are executable after build
tsc doesn't preserve the executable bit from source files, which means bin entry points won't work when the package is installed via npm workspaces (unlike registry installs, where npm sets +x automatically). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1d4193d commit 51a1fdf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ clean:
1616
build:
1717
tsc --build ./tsconfig.build.json
1818
cp ./shell/app.scss ./dist/shell/app.scss
19+
# When the package is installed from the registry, NPM sets the executable
20+
# bit on `bin` files automatically. It doesn't do the same in workspaces,
21+
# though, so we handle it explicitly here.
22+
chmod a+x $$(node -p "Object.values(require('./package.json').bin).join(' ')")
1923

2024
docs-build:
2125
${doc_command}

0 commit comments

Comments
 (0)