-
Notifications
You must be signed in to change notification settings - Fork 22
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
spawn doesn't work on windows (with npm for example) #33
Comments
I will look forward to a pull request, don't have access to a windows machine for testing this :( |
Probably need async spawn https://github.com/IndigoUnited/node-cross-spawn-async |
try v3.4.1 if it solves the problem. Windows is just not worth the troubles |
Can you try 3.5.2 - this has a fix for Windows were are trying to test out |
When i run it (the latest version) with node 5.7.0 it gives me SyntaxError: Unexpected token case with this package.json "scripts": {
...
"lint": "eslint source test",
...
},
"pre-commit": [
"lint"
],
"devDependencies": {
...
"pre-git": "^3.5.4",
...
}, |
Could you try pre-git v 3.7.0 please? |
Same env like before and when i do the commit `
pre-commit You've failed to pass all the hooks. but when i do `>npm run lint
The same thing happens with other comands |
Hmm, with v3.7.0 and the shell path is set correctly? https://github.com/bahmutov/pre-git#windows |
Yep. Do you need more info? |
Hmm, if @ybiquitous does not know, then it is up to you, @killanaca to debug and solve this. |
@killanaca If you change package.json:{
...
"config": {
"pre-git": {
"pre-commit": [
- "lint"
+ "npm run lint"
]
}
},
...
} |
yes, now it works ;-) |
hi when i do
git commit -m "blah blah blah"
with
"pre-commit": [
"npm version"
]
in package.json, it gives me :
executing task "npm" with args "version"
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
The same thing happens with gulp
"pre-commit": [
"gulp"
]
i think the problem is spawn in windows
maybe this help https://www.npmjs.com/package/cross-spawn
The text was updated successfully, but these errors were encountered: