This will currently work on windows but in an inconsistent manner.
For example:
x('eslint', ['--help']); // works on linux, fails on windows
x('eslint.cmd', ['--help']); // works on windows, fails on linux
The only solution to this seems to be to use a shell on windows, either by using shell: true or by calling cmd.exe with the target command as an argument.
If we do that, we may need to escape some things (e.g. the command name if it has spaces in).
This will currently work on windows but in an inconsistent manner.
For example:
The only solution to this seems to be to use a shell on windows, either by using
shell: true
or by callingcmd.exe
with the target command as an argument.If we do that, we may need to escape some things (e.g. the command name if it has spaces in).