-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUSKY_GIT_PARAMS not complete at Windows/cygwin #735
Comments
I'm having an issue I think is related. In a windows + git bash + npm + husky + lfs environment I was constantly getting "this should be run through git's post-checkout hook" even when I was running lfs through the hook:
It completely broke I found this was due to not all the HUSKY_GIT_PARAMS were being passed to the hook. Probably the interpretation of quotes is happening different in cygwin or something? I could not do a direct comparison with behavior on a different platform to narrow down the difference, but I must assume this is working correctly on unix platforms. Rather than adding slash-quoting to the husky.sh (which may break other platforms) I think the correct fix is to stop trying to pass them all in one string. PR to follow. |
Closing as it was fixed by @kirkoman and new version has been published :) |
HUSKY_GIT_PARAMS are not correctly provided to a node-process for prepare-commit-message.
OS: Windows 10
Shell: cygwin
Node: 12.16.1
Husky: 4.2.5
"prepare-commit-msg": "node bin/prepare-commit-msg/git-commit-template.js"
Output:
Expected Output:
Am I doing something wrong here?
I think the root-cause is at the
.git/hooks/husky.sh
- Line 17"$@" husky-run $hookName "$gitParams"
should be
"$@" husky-run $hookName \"$gitParams\"
The text was updated successfully, but these errors were encountered: