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

exec < /dev/tty && make an error? #636

Open
zzzgit opened this issue Jul 4, 2019 · 4 comments
Open

exec < /dev/tty && make an error? #636

zzzgit opened this issue Jul 4, 2019 · 4 comments

Comments

@zzzgit
Copy link

zzzgit commented Jul 4, 2019

module.exports = {
	"hooks": {
		// "prepare-commit-msg": "echo foooooo", // it works
               "prepare-commit-msg": "exec < /dev/tty && echo foooooo", 
	}
}

With the config above in .huskyrc.js, I will get an error in console:

husky > prepare-commit-msg (node v10.11.0)
The system cannot find the path specified.
husky > prepare-commit-msg hook failed (cannot be bypassed with --no-verify due to Git specs)

What's the cause?

@sadsa
Copy link

sadsa commented Sep 9, 2019

What is your development environment? i.e. OS etc. I know for a fact the Windows cannot execute this command.

@Classic-Paterson
Copy link

Classic-Paterson commented Nov 28, 2019

What is your development environment? i.e. OS etc. I know for a fact the Windows cannot execute this command.

Can confirm this.

@zzzgit
Copy link
Author

zzzgit commented Dec 3, 2019

What is your development environment? i.e. OS etc. I know for a fact the Windows cannot execute this command.

windows 7 git terminal

@Classic-Paterson
Copy link

The hook is written in bash - you either need to install the windows subsystem for linuc (WSL), or follow the later comments on this post #627 which creates a batch file for you to run it (note that this was done on windows 10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants