diff options
Diffstat (limited to 'deps/npm/lib/utils/lifecycle.js')
-rw-r--r-- | deps/npm/lib/utils/lifecycle.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index ffa6484fa8..e6ef925b30 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -185,14 +185,6 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { process.nextTick(dequeue) } - var sh = "sh" - var shFlag = "-c" - - if (process.platform === "win32") { - sh = "cmd" - shFlag = "/c" - } - var conf = { cwd: wd , env: env , stdio: [ 0, 1, 2 ] @@ -203,6 +195,15 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { conf.gid = gid ^ 0 } + var sh = "sh" + var shFlag = "-c" + + if (process.platform === "win32") { + sh = "cmd" + shFlag = "/c" + conf.windowsVerbatimArguments = true + } + var proc = spawn(sh, [shFlag, cmd], conf) proc.on("close", function (code, signal) { if (signal) { |