Skip to content

Commit

Permalink
chore: make husky executable when os is linux
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Mar 2, 2023
1 parent a692605 commit a6c6f2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:affected": "nx affected --target=lint --parallel=7",
"lint:style": "stylelint **/*.{css,scss,html,md}",
"lint:style:fix": "yarn lint:style --fix",
"prepare": "husky install && chmod ug+x .husky/*",
"prepare": "husky install && ts-node -P ./tools/tsconfig.json ./tools/husky.ts",
"prepublishOnly": "nx run-many --target=build --parallel=7 --exclude=site,vscode-extension",
"publish:vscode-extension": "yarn build:vscode-extension && cd dist/packages/vscode-extension && vsce publish --yarn",
"serve:site": "nx serve site",
Expand Down
6 changes: 6 additions & 0 deletions tools/husky.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { execSync } from 'child_process';
import { platform } from 'os';

if (platform() === 'linux') {
execSync('chmod ug+x .husky/*');
}

0 comments on commit a6c6f2f

Please sign in to comment.