ReviewOS

also looking at this

craft-native/craft

fix(shell): actually pass spawn its arguments

#77
Merged glennmichael123 wants to merge fix/shell-spawn-args into main
4 files +284 -11
packages/typescript/src/api/process.tsmodified+9-3
Changes to packages/typescript/src/api/process.ts
@@ -217,9 +217,15 @@ export interface SpawnOptions {
217217 cwd?: string
218218 env?: Record<string, string>
219219 /**
220 * Run the command through a shell. The Craft bridge translates this
221 * automatically (cmd.exe on Windows, /bin/sh elsewhere). On the Node
222 * fallback the command is rewritten to `cmd.exe /c <cmd>` on win32.
220 * Run `command` as a command line through a shell (cmd.exe on Windows,
221 * /bin/sh elsewhere) instead of executing it directly.
222 *
223 * Off by default, as in Node. Without it `command` is a program and `args`
224 * are its arguments, so a `;` or `|` inside an argument reaches the program
225 * as a plain character rather than as shell syntax.
226 *
227 * A shell takes one string, so `args` cannot be passed with it — supplying
228 * both is refused rather than silently honouring one of them.
223229 */
224230 shell?: boolean
225231}