-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Troubleshoot
- Before creating an issue, please check:
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:
- Terminal or GUI client (PowerShell, Git Bash, GitHub Desktop, ...)
- macOS iTerm2 ZSH
- If applicable, content of the failing hook
- See below
- 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:
$ npm ls husky
test@1.0.0 /Users/remarkablemark/test
└── husky@7.0.1
Thank you!
Mouvedia, kaimallea, Walheimat and AmirabbasJ