Win 10 Github Desktop pre-commit hook
See original GitHub issueHello, I have a problem with my pre-commit hook or husky in general when using Github Desktop. On the first look, it seems to be #1038, but the problem is. It works perfectly fine in VS code.
My environment: Terminal or GUI client: GitHub Desktop v2.9.4 (x64) System OS: Windows 10 Node Version: v15.14.0 npm Version: 7.7.6
I followed the following guide https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7
After that, I have now "husky": "^7.0.4"
in place and get the following error message:
/usr/bin/env: ‘bash’: No such file or directory
husky - pre-commit hook exited with code 127 (error)
Do I have to configure something in the pre-commit file?
# file .husky/pre-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run lint-staged-hook
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:21 (5 by maintainers)
Top Results From Across the Web
GitHub desktop Husky pre-commit hook does not
I installed husky@4 and lint-staged as per many other projects (on Mac OS11). The terminal command flow git add . and git commit...
Read more >pre-commit VS GitHub Desktop - SaaSHub
Compare pre-commit VS GitHub Desktop and find out what's different, what people are saying, ... Review - GitHub Desktop Quick Intro For Windows...
Read more >Using Git hooks to enforce development policies
This post describes how we used the Git pre-commit hook to enforce ... when he tries to commit using the GitHub Desktop app...
Read more >Husky - Git hooks
For Windows users, if you see the help message when running npx husky add ... ... npx husky add .husky/pre-commit "npm test" git...
Read more >Git Hooks | Learn how to use pre-commit hooks, post-commit ...
Git hooks are scripts that Git executes before or after events such as: commit, push, and receive. Git hooks are a built-in feature...
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 Free
Top 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
Add git bin to Path fixed my issue
It seems that I’m not the only one. Someone else also opened an issue for the desktop app desktop/desktop #13307 & desktop/desktop #12562