From 25f442b329448279db4de878cd0298e9931f4828 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 25 Feb 2026 23:19:25 +0800 Subject: [PATCH] fix(build): add postbuild hook to set executable permissions on Mac/Linux Add chmod 755 for ccw/bin/ccw.js and ccw-mcp.js after TypeScript compilation. This fixes the issue where ccw CLI cannot be executed directly on Mac/Linux after npm run build due to missing execute permissions. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 2402816c..313b01ac 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ ], "scripts": { "build": "tsc -p ccw/tsconfig.json", + "postbuild": "node -e \"const fs=require('fs');['ccw/bin/ccw.js','ccw/bin/ccw-mcp.js'].forEach(f=>{try{fs.chmodSync(f,0o755)}catch{}})\"", "start": "node ccw/bin/ccw.js", "test": "node --experimental-strip-types --test ccw/tests/*.test.js", "test:visual": "node --experimental-strip-types --test ccw/tests/visual/**/*.visual.test.ts",