Skip to content
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

[Bug] Husky error: Command not found on git commit -m " " #458

Closed
smitsekhadiaa opened this issue Sep 17, 2022 · 6 comments
Closed

[Bug] Husky error: Command not found on git commit -m " " #458

smitsekhadiaa opened this issue Sep 17, 2022 · 6 comments
Labels
kind/question Category issues related to questions or problems
Milestone

Comments

@smitsekhadiaa
Copy link
Contributor

Version

No response

Current Behavior

After adding the changes to the working tree, on git commit -m " " the terminal on windows (powershell and command prompt) are showing error- husky : command not found in PATH

image

Expected Behavior

After git add -A , git commit -m " " should work perfectly fine , committing the added changes on the respective branch.

Environment

- OS: Windows
- Browser: Google Chrome

Any additional comments?

No response

@smitsekhadiaa smitsekhadiaa added the kind/bug Category issues or prs related to bug. label Sep 17, 2022
@tyn1998
Copy link
Member

tyn1998 commented Sep 17, 2022

image

Hi @smitsekhadiaa, I have tested git commit operation on my windows machine which has a really clean environment and everything works well. I'm afraid that the issue is a specific one that only occurs on your machine.

The environment troubles are always disappointing and suck, be patient and good luck!

Suggestion: you may try WSL.

@tyn1998 tyn1998 changed the title Husky error: Command not found on git commit -m " "[Bug] [Bug] Husky error: Command not found on git commit -m " " Sep 17, 2022
@tyn1998
Copy link
Member

tyn1998 commented Sep 17, 2022

Hi, @zhicheng-ning, could you help to git commit a random change on your windows machine and upload a screenshot here? We are eager to know if the issue is a general problem on windows.

@zhicheng-ning
Copy link
Contributor

zhicheng-ning commented Sep 17, 2022

Hi, @zhicheng-ning, could you help to git commit a random change on your windows machine and upload a screenshot here? We are eager to know if the issue is a general problem on windows.

ok, this action is on the latest master branch.

image

@wxharry
Copy link
Collaborator

wxharry commented Sep 17, 2022

The first line indicates that the error might because of node, please check this issue to see if it would help. @smitsekhadiaa nodejs/node#29287

@smitsekhadiaa
Copy link
Contributor Author

smitsekhadiaa commented Sep 18, 2022

The error is solved.
the error was due to If you're running Git from an app and the command can be found in your terminal, this means that the PATH in your app is different from your terminal.
git config --unset core.hooksPath
The above command unsets the hooks path if its different
To revert the git-flow hooks directory back to its default you need to reset the config to point to the default Git hooks directory.
git config gitflow.path.hooks .git/hooks

@smitsekhadiaa
Copy link
Contributor Author

Thankyou @tyn1998 @zhicheng-ning @wxharry for your time.

@wxharry wxharry added kind/question Category issues related to questions or problems and removed kind/bug Category issues or prs related to bug. labels Sep 20, 2022
@tyn1998 tyn1998 added this to the 1.7.0 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Category issues related to questions or problems
Projects
None yet
Development

No branches or pull requests

4 participants