diff options
author | Satya Rohith <me@satyarohith.com> | 2022-07-21 14:15:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 14:15:15 +0530 |
commit | e98e0da8b218aa2b68d82ee7d777f499b10237aa (patch) | |
tree | 05cc660c005c35bdc27a4f37be295a0f06a3ccee /tools/flamebench.js | |
parent | f0e01682cce638303e3b6997788667a0f71dff8d (diff) |
fix(tools): upgrade to new `Deno.spawn` api (#15265)
Diffstat (limited to 'tools/flamebench.js')
-rwxr-xr-x | tools/flamebench.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/flamebench.js b/tools/flamebench.js index 5293fa9a1..54705d266 100755 --- a/tools/flamebench.js +++ b/tools/flamebench.js @@ -3,14 +3,14 @@ import { join, ROOT_PATH as ROOT } from "./util.js"; async function bashOut(subcmd) { - const { status, stdout } = await Deno.spawn("bash", { + const { success, stdout } = await Deno.spawn("bash", { args: ["-c", subcmd], stdout: "piped", stderr: "null", }); // Check for failure - if (!status.success) { + if (!success) { throw new Error("subcmd failed"); } // Gather output @@ -20,7 +20,7 @@ async function bashOut(subcmd) { } async function bashThrough(subcmd, opts = {}) { - const { status } = await Deno.spawn("bash", { + const { success, code } = await Deno.spawn("bash", { ...opts, args: ["-c", subcmd], stdout: "inherit", @@ -28,8 +28,8 @@ async function bashThrough(subcmd, opts = {}) { }); // Exit process on failure - if (!status.success) { - Deno.exit(status.code); + if (!success) { + Deno.exit(code); } } |