diff --git a/lib/child_process.js b/lib/child_process.js index 462decbd843..d6017d18ffe 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -608,7 +608,7 @@ function normalizeExecArgs(command /*, options, callback */) { } if (process.platform === 'win32') { - file = 'cmd.exe'; + file = process.env.comspec || 'cmd.exe'; args = ['/s', '/c', '"' + command + '"']; // Make a shallow copy before patching so we don't clobber the user's // options object.