Skip to content

Commit 4434eb5

Browse files
Merge pull request #3109 from nestjs/chore/disable-shell-by-default
chore: disable shell by default
2 parents aa6f234 + c31554d commit 4434eb5

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

commands/start.command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export class StartCommand extends AbstractCommand {
4444
)
4545
.option(
4646
'--shell',
47-
"Spawn child processes within a shell (see node's child_process.spawn() method docs). Default: true.",
48-
true,
47+
"Spawn child processes within a shell (see node's child_process.spawn() method docs). Default: false.",
48+
false,
4949
)
5050
.option('--no-shell', 'Do not spawn child processes within a shell.')
5151
.option(

lib/runners/abstract.runner.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export class AbstractRunner {
1717
const options: SpawnOptions = {
1818
cwd,
1919
stdio: collect ? 'pipe' : 'inherit',
20-
shell: true,
2120
};
2221
return new Promise<null | string>((resolve, reject) => {
2322
const child: ChildProcess = spawn(
@@ -35,9 +34,7 @@ export class AbstractRunner {
3534
resolve(null);
3635
} else {
3736
console.error(
38-
red(
39-
MESSAGES.RUNNER_EXECUTION_ERROR(`${this.binary} ${command}`),
40-
),
37+
red(MESSAGES.RUNNER_EXECUTION_ERROR(`${this.binary} ${command}`)),
4138
);
4239
reject();
4340
}

0 commit comments

Comments
 (0)