-
Notifications
You must be signed in to change notification settings - Fork 142
Description
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.
Normally, 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.
My 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.
I am using it here for my package Atom Beautify: Glavin001/atom-beautify@57ffe75
Please let me know what you think, and if I should submit a Pull Request with the workaround I described above.