-
-
Notifications
You must be signed in to change notification settings - Fork 34
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 throws an ArgumentException when I try to commit through Sourcetree #96
Comments
Hi @AntonisManiatis, Also, please check your Environment variables, This might imply you have two identical environment variables (on Windows that also ignores casing) |
Hi @alirezanet, Here's my git & git credential-manager versions: I checked my environment variables and nothing seems out of the ordinary, no duplicates etc. Also a colleague of mine tried on his machine (again windows 11 & latest Sourcetree) and it's the same story. I wrote a little program to print command line arguments and environment variables to standard out, changed the pre-commit hook to call that program instead of doing |
Hi @AntonisManiatis, #!/bin/sh
. "$(dirname "$0")/_/husky.sh"
# Log all environment variables
printenv
dotnet husky run -v --group "pre-commit" more info: https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables |
Hi @AntonisManiatis, |
thank you very much @alirezanet, cheers! |
Version
0.6.2
Details
I am not so sure if this should be opened as a bug or a discussion would be a better fit so apologies in advance but basically
whenever I try to commit changes through Sourcetree Husky throws an ArgumentException.
Here's the stack trace:
It works as expected if I try to commit either from the CLI, VS or VSCode but not on Sourcetree. I had a very quick look at the source code to try and figure out what could be happening but couldn't figure anything out immediately. Any idea what that Key: HOME might be or where it comes from? is it an environment variable? I'd appreciate any feedback on this, we'd really like to use your tool but without having to sacrificing Sourcetree in the process 😄. Thanks!
OS: Windows 11 Pro 22621.2428
Sourcetree version: 3.4.15
Steps to reproduce
The text was updated successfully, but these errors were encountered: