summaryrefslogtreecommitdiff
path: root/utils/run.ts
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2025-05-12 09:40:12 -0700
committerElizabeth <me@liz.coffee>2025-05-26 14:15:42 -0700
commitd51c9d74857aca3c2f172609297266968bc7f809 (patch)
tree64327f9cc4219729aa11af32d7d4c70cddfc2292 /utils/run.ts
parent30729a0cf707d9022bae0a7baaba77379dc31fd5 (diff)
downloadci-d51c9d74857aca3c2f172609297266968bc7f809.tar.gz
ci-d51c9d74857aca3c2f172609297266968bc7f809.zip
The big refactor TM
Diffstat (limited to 'utils/run.ts')
-rw-r--r--utils/run.ts21
1 files changed, 0 insertions, 21 deletions
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<string> => {
- 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;
-};