Git throwing out error related to Husky while trying to commit
See original GitHub issueDevice: Windows 10
Problem: When I tried to commit, an error was thrown out cannot spawn .husky/pre-commit: no such file or directory
Possible solution that worked for me: Adding #!/bin/sh
to the first line of .husky/pre-commit
.
PS: I haven’t tested if this would still work on Linux or not
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
husky - Strange error when attempting to commit. [subject-empty]
What it means is that you've added a non-Git program (specifically, something called "husky") and told Git to use Husky to check your...
Read more >Husky pre-commit fails with code 1 (error) · Issue #1014 - GitHub
I was able to resolve this error by running each precommit command individually. Turns out my test command ( jest ) was causing...
Read more >Preventing bad git commits with Husky - Compositional IT
We've all been in the situation where we've made a commit into source control, pushed, and then instantly realised that we've broken the...
Read more >githooks Documentation - Git
This hook is invoked by git-commit[1], and can be bypassed with the --no-verify option. It takes no parameters, and is invoked before obtaining...
Read more >Solving “Fatal: Not A Git Repository” (Or Any Of The Parent ...
This error means that you have some files that have been edited but not committed, and by checking out another branch, you'll overwrite...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can check all of them.
Yeah, I will go ahead and make a PR for this.
I did some research and found out using
sh
overbash
would be better assh
points to whatever will be the default scripting shell in that system.Btw which OS do you use @dwelle? I was thinking getting this PR checked by someone using Linux and maybe Mac as well before merging.