Skip to content

Commit d37c768

Browse files
authored
fix(build): husky "install command is deprecated" aws#5114
Problem: husky prints warning during "npm install": > [email protected] prepare > ts-node ./scripts/prepare.ts install command is deprecated Solution: Migrate as described in https://github.com/typicode/husky/releases/tag/v9.0.1
1 parent 39606c7 commit d37c768

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
git secrets --register-aws || (echo 'Please install git-secrets https://github.com/awslabs/git-secrets to check for accidentally commited secrets!' && exit 1)
52
git secrets --pre_commit_hook -- ""
63
node_modules/.bin/pretty-quick --staged

scripts/prepare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function main() {
2727
console.log('prepare: skipped (running in CI)')
2828
return
2929
}
30-
child_process.execSync('husky install', { stdio: 'inherit' })
30+
child_process.execSync('husky', { stdio: 'inherit' })
3131
}
3232

3333
main()

0 commit comments

Comments
 (0)