From 4e1ca1d1787f25ab9f0a72ccf9d8028f70b3a7ed Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Wed, 18 May 2022 22:00:11 +0200 Subject: refactor: use spawn API across codebase (#14414) --- tools/wgpu_sync.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tools/wgpu_sync.js') diff --git a/tools/wgpu_sync.js b/tools/wgpu_sync.js index c5b6ffc45..3c6217709 100755 --- a/tools/wgpu_sync.js +++ b/tools/wgpu_sync.js @@ -10,15 +10,17 @@ const V_WGPU = "0.12"; const TARGET_DIR = join(ROOT_PATH, "ext", "webgpu"); async function bash(subcmd, opts = {}) { - const p = Deno.run({ ...opts, cmd: ["bash", "-c", subcmd] }); + const { status } = await Deno.spawn("bash", { + ...opts, + args: ["-c", subcmd], + stdout: "inherit", + sdterr: "inherit", + }); // Exit process on failure - const { success, code } = await p.status(); - if (!success) { - Deno.exit(code); + if (!status.success) { + Deno.exit(status.code); } - // Cleanup - p.close(); } async function clearTargetDir() { -- cgit v1.2.3