fix: add postinstall script to set bin/hapi.cjs executable permission (#78)

This fixes an issue where npx @twsxtd/hapi fails because npm doesn't create
bin symlinks for packages with optionalDependencies. The postinstall script
ensures bin/hapi.cjs has executable permission.
This commit is contained in:
weishu
2026-01-18 12:27:43 +08:00
parent b93533b381
commit f00c290204
+1
View File
@@ -33,6 +33,7 @@
"@twsxtd/hapi-win32-x64": "0.9.0"
},
"scripts": {
"postinstall": "node -e \"try{require('fs').chmodSync(require('path').join(__dirname,'bin','hapi.cjs'),0o755)}catch(e){}\"",
"typecheck": "tsc --noEmit",
"build:exe": "bun run scripts/build-executable.ts",
"build:exe:all": "bun run scripts/build-executable.ts --all",