{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/7793","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/7793/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/7793/comments","events_url":"https://api.github.com/repos/atom/atom/issues/7793/events","html_url":"https://github.com/atom/atom/issues/7793","id":93821719,"number":7793,"title":"`BufferedProcess` doesn't yield an error running a not existing command on Windows","user":{"login":"b52","id":23704,"avatar_url":"https://avatars.githubusercontent.com/u/23704?v=3","gravatar_id":"","url":"https://api.github.com/users/b52","html_url":"https://github.com/b52","followers_url":"https://api.github.com/users/b52/followers","following_url":"https://api.github.com/users/b52/following{/other_user}","gists_url":"https://api.github.com/users/b52/gists{/gist_id}","starred_url":"https://api.github.com/users/b52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b52/subscriptions","organizations_url":"https://api.github.com/users/b52/orgs","repos_url":"https://api.github.com/users/b52/repos","events_url":"https://api.github.com/users/b52/events{/privacy}","received_events_url":"https://api.github.com/users/b52/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/atom/labels/bug","name":"bug","color":"f7c6c7"},{"url":"https://api.github.com/repos/atom/atom/labels/windows","name":"windows","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-08T15:39:16Z","updated_at":"2016-05-06T02:53:01Z","closed_at":"2016-05-06T02:53:01Z","body":"According to this [spec](https://github.com/atom/atom/blob/master/spec/buffered-process-spec.coffee#L15-L31) `BufferedProcess` should call the handler defined using `onWillThrowError` if the spawned command doesn't exist. However, this is not the case on my Windows box.\r\n\r\nSince the command is spawned in a sub-shell `cmd.exe` (which is an aweful default setup, this should be optional), the handler is never called but the default error message of `cmd.exe` is logged on `stderr` and the process (in this case `cmd.exe`) exits with status code `1`. This means the above mentioned spec should fail running on Windows, which seems to me like a bug in `BufferedProcess`."},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/217336718","html_url":"https://github.com/atom/atom/issues/7793#issuecomment-217336718","issue_url":"https://api.github.com/repos/atom/atom/issues/7793","id":217336718,"user":{"login":"damieng","id":118951,"avatar_url":"https://avatars.githubusercontent.com/u/118951?v=3","gravatar_id":"","url":"https://api.github.com/users/damieng","html_url":"https://github.com/damieng","followers_url":"https://api.github.com/users/damieng/followers","following_url":"https://api.github.com/users/damieng/following{/other_user}","gists_url":"https://api.github.com/users/damieng/gists{/gist_id}","starred_url":"https://api.github.com/users/damieng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damieng/subscriptions","organizations_url":"https://api.github.com/users/damieng/orgs","repos_url":"https://api.github.com/users/damieng/repos","events_url":"https://api.github.com/users/damieng/events{/privacy}","received_events_url":"https://api.github.com/users/damieng/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T02:53:01Z","updated_at":"2016-05-06T02:53:01Z","body":"You can now avoid this (in master) by specifying `options.shell: false ` in your call to BufferedProcess.\r\n\r\nBear in mind that doing this means you can not run .bat or .cmd files with options.shell: false.\r\n\r\nDo not use `options.shell: true` at this time - that setting is reserved for Node 5.7 compatibility and will behave like false until then."}}