summaryrefslogtreecommitdiff
path: root/tools/wgpu_sync.js
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2022-05-18 22:00:11 +0200
committerGitHub <noreply@github.com>2022-05-18 22:00:11 +0200
commit4e1ca1d1787f25ab9f0a72ccf9d8028f70b3a7ed (patch)
tree2d0062ec1dd864c7ed98301119ac5f1c133f844a /tools/wgpu_sync.js
parent5ad8919d642b646caa3328930dd1a3f290bc587e (diff)
refactor: use spawn API across codebase (#14414)
Diffstat (limited to 'tools/wgpu_sync.js')
-rwxr-xr-xtools/wgpu_sync.js14
1 files changed, 8 insertions, 6 deletions
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() {