Troubleshoot
If you're migrating from husky 4, see:
https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7
Context
Please describe your issue and provide some context:
- Terminal or GUI client (PowerShell, Git Bash, GitHub Desktop, ...)
- If applicable, content of the failing hook
- If possible, minimal steps to reproduce the issue:
Create empty directory with git:
$ mkdir test && cd test && git init
Install husky:
$ npx husky install
husky - Git hooks installed
Running command from docs:
$ npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
husky - created .husky/commit-msg
Expected output of .husky/commit-msg:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit "$1"
Actual output of cat .husky/commit-msg:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit ""
My version of husky:
Thank you!
Troubleshoot
https://typicode.github.io/husky/#/?id=troubleshoot
If you're migrating from husky 4, see:
https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7
Context
Please describe your issue and provide some context:
Create empty directory with git:
Install husky:
Running command from docs:
$ npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' husky - created .husky/commit-msgExpected output of
.husky/commit-msg:Actual output of
cat .husky/commit-msg:My version of husky:
Thank you!