From 45c49034a7ea20f27287cd8559ea050d8973bfae Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Mon, 18 Jul 2022 14:16:12 +0100 Subject: BREAKING(unstable): Improve Deno.spawn() stdio API (#14919) - "SpawnOutput" extends "ChildStatus" instead of composing it - "SpawnOutput::stdout", "SpawnOutput::stderr", "Child::stdin", "Child::stdout" and "Child::stderr" are no longer optional, instead made them getters that throw at runtime if that stream wasn't set to "piped". - Remove the complicated "" which we currently need to give proper type hints for the availability of these fields. Their typings for these would get increasingly complex if it became dependent on more options (e.g. "SpawnOptions::pty" which if set should make the stdio streams unavailable) --- cli/tests/testdata/089_run_allow_list.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tests/testdata/089_run_allow_list.ts') diff --git a/cli/tests/testdata/089_run_allow_list.ts b/cli/tests/testdata/089_run_allow_list.ts index 0eb79dcc2..d7bc8e195 100644 --- a/cli/tests/testdata/089_run_allow_list.ts +++ b/cli/tests/testdata/089_run_allow_list.ts @@ -4,9 +4,9 @@ try { console.log(e); } -const { status } = await Deno.spawn("curl", { +const { success } = await Deno.spawn("curl", { args: ["--help"], stdout: "null", stderr: "inherit", }); -console.log(status.success); +console.log(success); -- cgit v1.2.3