From d51c9d74857aca3c2f172609297266968bc7f809 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Mon, 12 May 2025 09:40:12 -0700 Subject: The big refactor TM --- utils/run.ts | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 utils/run.ts (limited to 'utils/run.ts') diff --git a/utils/run.ts b/utils/run.ts deleted file mode 100644 index f06ef97..0000000 --- a/utils/run.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const getStdout = async ( - cmd: string[] | string, - options: Deno.CommandOptions = {}, -): Promise => { - const [exec, ...args] = (typeof cmd === "string") ? cmd.split(" ") : cmd; - const command = new Deno.Command(exec, { - args, - stdout: "piped", - stderr: "piped", - ...options, - }); - - const { code, stdout, stderr } = await command.output(); - - const stdoutText = new TextDecoder().decode(stdout); - const stderrText = new TextDecoder().decode(stderr); - - if (code !== 0) throw new Error(`Command failed\n${stderrText}`); - - return stdoutText; -}; -- cgit v1.2.3-70-g09d2