From bca0fe1cde3d30ce31c158862cc6764babf71a14 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 28 Mar 2024 19:44:42 +0530 Subject: fix(ext/node): support stdin: "inherit" in node:child_process (#23110) Fixes https://github.com/denoland/deno/issues/23051 --- ext/node/polyfills/internal/child_process.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ext/node/polyfills') diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 0ca2a958e..b6137e0d1 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -866,7 +866,7 @@ export function spawnSync( windowsVerbatimArguments = false, } = options; const [ - _stdin_ = "pipe", // TODO(bartlomieju): use this? + stdin_ = "pipe", stdout_ = "pipe", stderr_ = "pipe", _channel, // TODO(kt3k): handle this correctly @@ -881,6 +881,7 @@ export function spawnSync( env: mapValues(env, (value) => value.toString()), stdout: toDenoStdio(stdout_), stderr: toDenoStdio(stderr_), + stdin: stdin_ == "inherit" ? "inherit" : "null", uid, gid, windowsRawArguments: windowsVerbatimArguments, -- cgit v1.2.3