Skip to content

Commit a6c6f2f

Browse files
committed
chore: make husky executable when os is linux
1 parent a692605 commit a6c6f2f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lint:affected": "nx affected --target=lint --parallel=7",
1313
"lint:style": "stylelint **/*.{css,scss,html,md}",
1414
"lint:style:fix": "yarn lint:style --fix",
15-
"prepare": "husky install && chmod ug+x .husky/*",
15+
"prepare": "husky install && ts-node -P ./tools/tsconfig.json ./tools/husky.ts",
1616
"prepublishOnly": "nx run-many --target=build --parallel=7 --exclude=site,vscode-extension",
1717
"publish:vscode-extension": "yarn build:vscode-extension && cd dist/packages/vscode-extension && vsce publish --yarn",
1818
"serve:site": "nx serve site",

tools/husky.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { execSync } from 'child_process';
2+
import { platform } from 'os';
3+
4+
if (platform() === 'linux') {
5+
execSync('chmod ug+x .husky/*');
6+
}

0 commit comments

Comments
 (0)