From 5992d6ace154c4231185b3e6ddd0783081c94b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Bel?= Date: Fri, 7 Aug 2026 14:43:22 +0200 Subject: [PATCH 1/3] fix: preserve exec bit on dist/cli.js after build The prebuild clean removes dist/, and tsc regenerates cli.js without the executable bit. This breaks a globally linked install (npm link), since the bin symlink then points at a non-executable file: `openwiki` fails with "permission denied" after every rebuild. Add a postbuild chmod so the linked global command survives rebuilds. Co-Authored-By: Claude Opus 5 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 740da899b..88e9282a4 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "format:check": "prettier --check .", "lint": "eslint . --fix", "lint:check": "eslint .", + "postbuild": "chmod +x dist/cli.js", "prebuild": "pnpm run clean", "prepack": "pnpm run build", "release": "pnpm run stamp:channel && pnpm run build && changeset publish", From e1948cf1535b23f953065a8d9a26dcbe76820c3c Mon Sep 17 00:00:00 2001 From: Colin Francis Date: Fri, 7 Aug 2026 21:36:57 -0700 Subject: [PATCH 2/3] add changeset --- .changeset/huge-spiders-shave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/huge-spiders-shave.md diff --git a/.changeset/huge-spiders-shave.md b/.changeset/huge-spiders-shave.md new file mode 100644 index 000000000..fb8fe6afd --- /dev/null +++ b/.changeset/huge-spiders-shave.md @@ -0,0 +1,5 @@ +--- +"openwiki": patch +--- + +fix: preserve exec bit on dist/cli.js after build From 5296c15da1a6cef0810fb8d66a4ae083a661f98b Mon Sep 17 00:00:00 2001 From: Colin Francis Date: Fri, 7 Aug 2026 21:39:24 -0700 Subject: [PATCH 3/3] correct postbuild chmod path and make it cross-platform --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fa63ebea..56011c269 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "format:check": "prettier --check .", "lint": "eslint . --fix", "lint:check": "eslint .", - "postbuild": "chmod +x dist/cli.js", + "postbuild": "node -e \"require('fs').chmodSync('dist/cli/cli.js', 0o755)\"", "prebuild": "pnpm run clean", "prepack": "pnpm run build", "release": "pnpm run stamp:channel && pnpm run build && changeset publish",