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
Problem with the pre-push git hook #646
Comments
I'm getting exactly the same thing on push, on mint but same Ubuntu 18.04 version basically |
Looks like it broke in 4.0.9 by #645 If I delete the new case statement from case $hookName in
"pre-push"|"pre-receive"|"post-receive"|"post-rewrite")
export HUSKY_GIT_STDIN=\`cat\`;;
esac |
I think it needs to have quotes (") like: case $hookName in
"pre-push"|"pre-receive"|"post-receive"|"post-rewrite")
export HUSKY_GIT_STDIN="`cat`";;
esac Since bash will throw an error when u do something like: Also if I just do an |
I am seeing this as well, if I just change the shebang at the top to use |
I'm getting the same problem when using WSL with Ubuntu 18.04 |
I'm facing exactly the same problem as well. |
BTW, I think @soda0289 is right: it has broken in 4.0.9 version. I tried to use the 4.0.7 one and it works. The maintainer will probably solve it as soon as he realizes it. |
I am also having the same issue, downgrading to 4.0.7 appears to work. |
Meanwhile, this works: git push --no-verify I think we should keep sh compatibility (don't fix with |
for me 3 version instead 4 is worked normally. |
@millette for the record I agree totally, changing to /bin/bash is not a solution I recommend, was just offering another option to people to unstick themselves in case it was useful. I've pinned my dependency on this module to 4.0.7 pending discussion here. Cheers :-) |
As @soda0289 pointed out, it was missing a |
Love husky, thanks @typicode |
Issue has been addressed in version 4.0.10. |
After installing the husky latest version (4.0.9) and setting the following hooks in the package.json file,
each time I try to push to the origin I'm getting the following error having my push aborted,
git push -u origin master .git/hooks/pre-push: 70: export: refs/heads/master: bad variable name error: failed to push some refs to 'git@bitbucket.org:tzeikob/husk.git'
OS: Ubuntu 18.04 LTS
HUSKY_DEBUG=1 git push -u origin master husky:debug husky v4.0.9 (created at 2020-1-14 8:55:17 PM) husky:debug pre-push hook started husky:debug Current working directory is /home/akis/Workspace/sources/temp/husk husky:debug pre-push hook started .git/hooks/pre-push: 70: export: refs/heads/master: bad variable name error: failed to push some refs to 'git@bitbucket.org:tzeikob/husk.git'
The text was updated successfully, but these errors were encountered: