diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-12-02 14:43:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 14:43:17 +0100 |
commit | 4d07ed0efa8f0e2cab1a33f1b7b6a3627bfce69f (patch) | |
tree | 898aadf1ae739190ed98ec463824f7e9ca8f48eb /tools/flamebench.js | |
parent | 6982c74e11ec8294ed5bd53d2a9d316d7e20e7d2 (diff) |
chore: rewrite tests and utils to use Deno.Command API (#16895)
Since "Deno.spawn()", "Deno.spawnSync()" and "Deno.spawnChild"
are getting deprecated, this commits rewrites all tests and utilities to
use "Deno.Command" API instead.
Diffstat (limited to 'tools/flamebench.js')
-rwxr-xr-x | tools/flamebench.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/flamebench.js b/tools/flamebench.js index 54705d266..7c79bd10f 100755 --- a/tools/flamebench.js +++ b/tools/flamebench.js @@ -3,11 +3,11 @@ import { join, ROOT_PATH as ROOT } from "./util.js"; async function bashOut(subcmd) { - const { success, stdout } = await Deno.spawn("bash", { + const { success, stdout } = await new Deno.Command("bash", { args: ["-c", subcmd], stdout: "piped", stderr: "null", - }); + }).output(); // Check for failure if (!success) { @@ -20,12 +20,12 @@ async function bashOut(subcmd) { } async function bashThrough(subcmd, opts = {}) { - const { success, code } = await Deno.spawn("bash", { + const { success, code } = await new Deno.Command("bash", { ...opts, args: ["-c", subcmd], stdout: "inherit", stderr: "inherit", - }); + }).output(); // Exit process on failure if (!success) { |