From ec9342f95a950ac13f57c85ef577e3bbab180e1a Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sun, 24 Mar 2024 11:25:53 +0530 Subject: fix(ext/node): handle `null` in stdio array (#23048) Fixes https://github.com/denoland/deno/issues/23045 --- tests/unit_node/child_process_test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/unit_node/child_process_test.ts b/tests/unit_node/child_process_test.ts index 36d9d4345..6a1d1dbc5 100644 --- a/tests/unit_node/child_process_test.ts +++ b/tests/unit_node/child_process_test.ts @@ -810,3 +810,16 @@ Deno.test(async function spawnCommandNotFoundErrno() { }); await promise; }); + +// https://github.com/denoland/deno/issues/23045 +Deno.test(function spawnCommandNullStdioArray() { + const ret = spawnSync( + `"${Deno.execPath()}" eval "console.log('hello');console.error('world')"`, + { + stdio: [null, null, null], + shell: true, + }, + ); + + assertEquals(ret.status, 0); +}); -- cgit v1.2.3