-
-
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
I understand this works with GUI's but what about Github's Desktop Client? #49
Comments
maybe it is the problem with github desktop? |
Hi, What's the output of |
OSX EL Capitan, 10.11.5 which node = The weird part is that before I found husky, I had tried using ghooks. Ghooks worked in the CLI but the Desktop Client broke with the no env node error so I know that the desktop client does try to run git hooks properly. I believe that something within the husky generated script skips the entire hook if node isn't found. |
It checks if If you want verify it, you can run: my-project$ echo $PATH
# echo $PATH in some file when pre-commit is called
my-project$ mv .git/hooks/pre-commit .git/hooks/pre-commit.bak
my-project$ echo 'echo $PATH > ../../precommit-path' > .git/hooks/pre-commit
# try to make a commit from GitHub Desktop and check the output
my-project$ cat precommit-path Sorry I'm on Linux right now, so I can't test it. |
Quick update, works with |
I confirm, husky hooks don't work for GUI clients with Node installed without use of @typicode, you're exactly right:
After some research I found that GUI apps on mac didn't respect I've installed node via homebrew. Both
I know that this is not really a husky issue, that is simply how mac GUI apps work. However, if we could include |
I agree :), do you want to make a PR? |
Should be good with |
Still seeing the original issue of the I checked the OS: Windows 7 |
@nick-woodward is it with latest husky? |
@iamstarkov Sorry forgot to mention that. Yes I'm using 0.11.8. |
Hi, somehow I still have that exact same issue as well: OS: macOS Sierra 10.12.4 Am I missing something? Thanks in advance! |
Nevermind! I just had removed another precommit lib ( |
I'm having this problem with nodenv installed, since |
@jbcpollak did you figure it out? |
@jbcpollak @lasergoat my work a round for nodenv is the following:
As husky executes the nvm.sh it will also initialize nodenv. However it would be nice if husky could detect nodenv and call that command directly |
@jantimon that's a great idea - I'll try it. I had been installing a copy of node directly through homebrew, but I'll try this solution instead. |
How did you solve this issue? I'm now getting the error |
@jonaskkristensen I never did solve this, it just started working after their PR and me switching to the newer github client when it came out. What node version are you?
or if using nvm, do Make sure it's higher than 8.6.0 |
I have installed node with the standard installer.
I have husky working in the CLI but Github Desktop Client acts like there are no scripts to run.
The text was updated successfully, but these errors were encountered: