Skip to content

Commit 9c8c25c

Browse files
committed
fix: Node v24 DEP0190 warning by removing args for shell: true
1 parent 9c449ab commit 9c8c25c

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

actions/start.action.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { red } from 'ansis';
2-
import { spawn } from 'child_process';
2+
import { spawn, SpawnOptions } from 'child_process';
33
import * as fs from 'fs';
44
import { join } from 'path';
55
import { Input } from '../commands';
@@ -218,9 +218,16 @@ export class StartAction extends BuildAction {
218218

219219
processArgs.unshift('--enable-source-maps');
220220

221-
return spawn(binaryToRun, processArgs, {
221+
const spawnOptions: SpawnOptions = {
222222
stdio: 'inherit',
223223
shell: options.shell,
224-
});
224+
};
225+
226+
if (options.shell) {
227+
const fullCommand = [binaryToRun, ...processArgs].join(' ');
228+
return spawn(fullCommand, spawnOptions);
229+
}
230+
231+
return spawn(binaryToRun, processArgs, spawnOptions);
225232
}
226233
}

lib/runners/abstract.runner.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ export class AbstractRunner {
2222
shell: true,
2323
};
2424
return new Promise<null | string>((resolve, reject) => {
25-
const child: ChildProcess = spawn(
26-
`${this.binary}`,
27-
[...this.args, ...args],
28-
options,
29-
);
25+
const command = [this.binary, ...this.args, ...args].join(' ');
26+
const child: ChildProcess = spawn(command, options);
3027
if (collect) {
3128
child.stdout!.on('data', (data) =>
3229
resolve(data.toString().replace(/\r\n|\n/, '')),

0 commit comments

Comments
 (0)