{"action":"created","issue":{"url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/16","labels_url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/16/comments","events_url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/16/events","html_url":"https://github.com/IndigoUnited/node-cross-spawn/issues/16","id":88191329,"number":16,"title":"Does not return error ENOENT when program not found on Windows","user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-14T14:21:38Z","updated_at":"2015-06-14T23:10:06Z","closed_at":null,"body":"Thanks for developing cross-spawn! It is disappointing that Node.js does not support this out of the box, and your package provides something of great value to those developing packages that require support for Windows. \r\n\r\n---\r\n\r\nNormally, when `spawn` cannot find the program to be executed it returns an error ENOENT. However, since this command is wrapped in `cmd.exe` it no longer does that, and instead returns an error generated by `cmd.exe` and has `returnCode=1` and `stderr` in the form `“command” is not recognized as an internal or external command, operable program or batch file. `\r\n\r\nMy workaround was to check if `returnCode` equals `1` (non-zero) and if the `stderr` message contains similar text, such as the part: `is not recognized as an internal or external command`.\r\n\r\nI am using it here for my package Atom Beautify: https://github.com/Glavin001/atom-beautify/commit/57ffe7543b6599c48fb878a6ffc89c0ca19af833\r\n\r\nPlease let me know what you think, and if I should submit a Pull Request with the workaround I described above."},"comment":{"url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/comments/111883228","html_url":"https://github.com/IndigoUnited/node-cross-spawn/issues/16#issuecomment-111883228","issue_url":"https://api.github.com/repos/IndigoUnited/node-cross-spawn/issues/16","id":111883228,"user":{"login":"satazor","id":1017236,"avatar_url":"https://avatars.githubusercontent.com/u/1017236?v=3","gravatar_id":"","url":"https://api.github.com/users/satazor","html_url":"https://github.com/satazor","followers_url":"https://api.github.com/users/satazor/followers","following_url":"https://api.github.com/users/satazor/following{/other_user}","gists_url":"https://api.github.com/users/satazor/gists{/gist_id}","starred_url":"https://api.github.com/users/satazor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satazor/subscriptions","organizations_url":"https://api.github.com/users/satazor/orgs","repos_url":"https://api.github.com/users/satazor/repos","events_url":"https://api.github.com/users/satazor/events{/privacy}","received_events_url":"https://api.github.com/users/satazor/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T23:10:06Z","updated_at":"2015-06-14T23:10:06Z","body":"Yep exactly. Can you do a PR with the implementation and tests? "}}