From 2c3cf60b11c1c3d75515215c074fb3abad40ca6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=BC=E5=95=B8=E9=9A=8F=E9=A3=8E?= Date: Thu, 16 Mar 2017 10:32:30 +0800 Subject: [PATCH] add executable arguments to spawn in win32 In win32, commander just spawn the subcommander in this package's `bin` scripts. so, just add the `process.execArgv` into `args` is ok. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 5344efb08..2fa920107 100644 --- a/index.js +++ b/index.js @@ -548,6 +548,8 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { } } else { args.unshift(bin); + // add executable arguments to spawn + args = (process.execArgv || []).concat(args); proc = spawn(process.execPath, args, { stdio: 'inherit'}); }