Skip to content

Commit

Permalink
One more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lerarosalene authored and remy committed Mar 22, 2023
1 parent abc8522 commit 9f3ffdb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/monitor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ function run(options) {
sh = process.env.comspec || 'cmd';
shFlag = '/d /s /c';
spawnOptions.windowsVerbatimArguments = true;
spawnOptions.windowsHide = true;
}

var args = runCmd ? utils.stringify(executable, cmd.args) : ':';
Expand Down Expand Up @@ -122,11 +123,15 @@ function run(options) {
var forkArgs = cmd.args.slice(1);
var env = utils.merge(options.execOptions.env, process.env);
stdio.push('ipc');
child = fork(options.execOptions.script, forkArgs, {
const forkOptions = {
env: env,
stdio: stdio,
silent: !hasStdio,
});
};
if (utils.isWindows) {
forkOptions.windowsHide = true;
}
child = fork(options.execOptions.script, forkArgs, forkOptions);
utils.log.detail('forking');
debug('fork', sh, shFlag, args);
} else {
Expand Down

0 comments on commit 9f3ffdb

Please sign in to comment.