Skip to content

Commit

Permalink
add executable arguments to spawn in win32
Browse files Browse the repository at this point in the history
In win32, commander just spawn the subcommander in this package's `bin` scripts.
so, just add the `process.execArgv` into `args` is ok.
  • Loading branch information
hxsf committed Mar 16, 2017
1 parent 3367806 commit 2c3cf60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
}

Expand Down

0 comments on commit 2c3cf60

Please sign in to comment.