Skip to content

Commit bbe113a

Browse files
committed
fix(utils): remove unsafe shell:true option from executeProcess
1 parent c4b025c commit bbe113a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

packages/nx-plugin/src/internal/execute-process.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ export function executeProcess(cfg: ProcessConfig): Promise<ProcessResult> {
151151
);
152152

153153
return new Promise((resolve, reject) => {
154-
// shell:true tells Windows to use shell command for spawning a child process
155-
const process = spawn(command, args, { cwd, shell: true });
154+
const process = spawn(command, args, { cwd });
156155
// eslint-disable-next-line functional/no-let
157156
let stdout = '';
158157
// eslint-disable-next-line functional/no-let

packages/utils/src/lib/execute-process.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,7 @@ export function executeProcess(cfg: ProcessConfig): Promise<ProcessResult> {
158158
}
159159

160160
return new Promise((resolve, reject) => {
161-
// shell:true tells Windows to use shell command for spawning a child process
162161
const spawnedProcess = spawn(command, args ?? [], {
163-
shell: true,
164162
windowsHide: true,
165163
...options,
166164
}) as ChildProcessByStdio<Writable, Readable, Readable>;

0 commit comments

Comments
 (0)