question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Win 10 Github Desktop pre-commit hook

See original GitHub issue

Hello, 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)

grafik

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:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
Yiding-Ayacommented, Jun 2, 2022

Add git bin to Path fixed my issue image

7reactions
JosefBredereckcommented, Jun 5, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found