diff options
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index b11281fd7..33b0b3166 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -53,6 +53,13 @@ export function mapValues<T, O>( const entries = Object.entries(record); for (const [key, value] of entries) { + if (typeof value === "undefined") { + continue; + } + if (value === null) { + continue; + } + const mappedValue = transformer(value); ret[key] = mappedValue; @@ -836,7 +843,7 @@ export function spawnSync( const output = new Deno.Command(command, { args, cwd, - env, + env: mapValues(env, (value) => value.toString()), stdout: toDenoStdio(normalizedStdio[1]), stderr: toDenoStdio(normalizedStdio[2]), uid, |