Skip to content

Commit

Permalink
fix(build): husky "install command is deprecated" #5114
Browse files Browse the repository at this point in the history
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
  • Loading branch information
justinmk3 authored Jun 7, 2024
1 parent 39606c7 commit d37c768
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

git secrets --register-aws || (echo 'Please install git-secrets https://github.com/awslabs/git-secrets to check for accidentally commited secrets!' && exit 1)
git secrets --pre_commit_hook -- ""
node_modules/.bin/pretty-quick --staged
2 changes: 1 addition & 1 deletion scripts/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function main() {
console.log('prepare: skipped (running in CI)')
return
}
child_process.execSync('husky install', { stdio: 'inherit' })
child_process.execSync('husky', { stdio: 'inherit' })
}

main()

0 comments on commit d37c768

Please sign in to comment.