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

sh executable file not found #91

Closed
seniorquico opened this issue Nov 22, 2019 · 4 comments · Fixed by #108
Closed

sh executable file not found #91

seniorquico opened this issue Nov 22, 2019 · 4 comments · Fixed by #108
Labels
bug Something isn't working Windows Windows case

Comments

@seniorquico
Copy link

On Windows 10 with lefthook 0.6.5, I get the following error:

exec: "sh": executable file not found in %PATH%

It even occurs when running lefthook version.

@Arkweid Arkweid added bug Something isn't working Windows Windows case labels Nov 25, 2019
@Arkweid
Copy link
Collaborator

Arkweid commented Nov 25, 2019

Try to run in with mingw terminal(https://gitforwindows.org/ or similar) or inside Windows Subsystem for Linux (WSL)

@seniorquico
Copy link
Author

Yes, I can get it to work if I get a copy of sh and place it on my path. Do you expect, short- or long-term, that sh will be a requirement for running lefthook on Windows?

@Arkweid
Copy link
Collaborator

Arkweid commented Nov 26, 2019

Yep, for now it a requirement. With sh users have an ability to write simple scripts, comething like that:

eslint:
    glob: "*.{js,ts}"
    run: yarn eslint {staged_files} && git add

@Arkweid
Copy link
Collaborator

Arkweid commented Dec 22, 2019

If anyone has tips on how to support the sh syntax for windows, I will be glad to know about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Windows case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants