{"action":"created","issue":{"url":"https://api.github.com/repos/bahmutov/pre-git/issues/33","repository_url":"https://api.github.com/repos/bahmutov/pre-git","labels_url":"https://api.github.com/repos/bahmutov/pre-git/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/bahmutov/pre-git/issues/33/comments","events_url":"https://api.github.com/repos/bahmutov/pre-git/issues/33/events","html_url":"https://github.com/bahmutov/pre-git/issues/33","id":98391730,"number":33,"title":"spawn doesn't work on windows (with npm for example)","user":{"login":"killanaca","id":157641,"avatar_url":"https://avatars.githubusercontent.com/u/157641?v=3","gravatar_id":"","url":"https://api.github.com/users/killanaca","html_url":"https://github.com/killanaca","followers_url":"https://api.github.com/users/killanaca/followers","following_url":"https://api.github.com/users/killanaca/following{/other_user}","gists_url":"https://api.github.com/users/killanaca/gists{/gist_id}","starred_url":"https://api.github.com/users/killanaca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killanaca/subscriptions","organizations_url":"https://api.github.com/users/killanaca/orgs","repos_url":"https://api.github.com/users/killanaca/repos","events_url":"https://api.github.com/users/killanaca/events{/privacy}","received_events_url":"https://api.github.com/users/killanaca/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bahmutov/pre-git/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/bahmutov/pre-git/labels/minor","name":"minor","color":"fad8c7"},{"url":"https://api.github.com/repos/bahmutov/pre-git/labels/windows","name":"windows","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-31T13:33:42Z","updated_at":"2016-03-18T08:37:39Z","closed_at":null,"body":"hi when i do \r\ngit commit -m \"blah blah blah\"\r\nwith \r\n  \"pre-commit\": [\r\n    \"npm version\"\r\n  ]\r\nin package.json, it gives me :\r\n\r\nexecuting task \"npm\" with args \"version\"\r\nevents.js:85\r\n      throw er; // Unhandled 'error' event\r\n            ^\r\nError: spawn npm ENOENT\r\n    at exports._errnoException (util.js:746:11)\r\n    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)\r\n    at child_process.js:1144:20\r\n    at process._tickCallback (node.js:355:11)\r\n\r\nThe same thing happens with gulp \r\n  \"pre-commit\": [\r\n    \"gulp\"\r\n  ]\r\n \r\ni think the problem is spawn in windows \r\nmaybe this help https://www.npmjs.com/package/cross-spawn"},"comment":{"url":"https://api.github.com/repos/bahmutov/pre-git/issues/comments/198256433","html_url":"https://github.com/bahmutov/pre-git/issues/33#issuecomment-198256433","issue_url":"https://api.github.com/repos/bahmutov/pre-git/issues/33","id":198256433,"user":{"login":"killanaca","id":157641,"avatar_url":"https://avatars.githubusercontent.com/u/157641?v=3","gravatar_id":"","url":"https://api.github.com/users/killanaca","html_url":"https://github.com/killanaca","followers_url":"https://api.github.com/users/killanaca/followers","following_url":"https://api.github.com/users/killanaca/following{/other_user}","gists_url":"https://api.github.com/users/killanaca/gists{/gist_id}","starred_url":"https://api.github.com/users/killanaca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killanaca/subscriptions","organizations_url":"https://api.github.com/users/killanaca/orgs","repos_url":"https://api.github.com/users/killanaca/repos","events_url":"https://api.github.com/users/killanaca/events{/privacy}","received_events_url":"https://api.github.com/users/killanaca/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T08:37:39Z","updated_at":"2016-03-18T08:37:39Z","body":"Same env like before and when i do the commit\r\n\r\n`\r\n>git commit -m \"ADDED pre-git\"\r\nrunning pre-commit script\r\nexecuting task \"lint\"\r\n\"lint\" non � riconosciuto come comando interno o esterno,\r\n un programma eseguibile o un file batch.\r\n\r\npre-commit You've failed to pass all the hooks.\r\npre-commit\r\npre-commit An Error was thrown from command\r\nlint\r\nError: lint closed with code 1\r\npre-commit\r\npre-commit    at ChildProcess.onTaskFinished (E:\\P\\hooks-bot-directio\\node_modules\\pre-git\\src\\pre-git.js:170:19)\r\npre-commit    at emitTwo (events.js:105:20)\r\npre-commit    at ChildProcess.emit (events.js:185:7)\r\npre-commit    at maybeClose (internal/child_process.js:827:16)\r\npre-commit    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)\r\npre-commit\r\npre-commit You can skip the git hook by running with -n (--no-verify)\r\npre-commit\r\npre-commit But this is not advised as your tests are obviously failing.\r\n`\r\n\r\nbut when i do\r\n\r\n`>npm run lint\r\n\r\n> hooks-bot-directio@1.2.3 lint E:\\P\\hooks-bot-directio\r\n> eslint source test\r\n>\r\n`\r\n\r\nThe same thing happens with other comands\r\n"}}