chore(tools): do not use npm exec in git hooks

`npm exec` was added in npm version 7, so users of older versions of
npm will get a very weird error and are not able to commit
pull/962/head
Jan van Brügge 4 years ago
parent 714f4ad770
commit 66d08e4861
No known key found for this signature in database
GPG Key ID: 88E0BF7B7A546481

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
npm exec commithelper -- check --file $1 --fix ./node_modules/.bin/commithelper check --file $1 --fix

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
npm exec -- lint-staged ./node_modules/.bin/lint-staged

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname "$0")/_/husky.sh"
exec < /dev/tty && npm exec commithelper -- prompt --file $1 exec < /dev/tty && ./node_modules/.bin/commithelper prompt --file $1

Loading…
Cancel
Save