diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2022-05-18 22:00:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 22:00:11 +0200 |
commit | 4e1ca1d1787f25ab9f0a72ccf9d8028f70b3a7ed (patch) | |
tree | 2d0062ec1dd864c7ed98301119ac5f1c133f844a /tools/wpt.ts | |
parent | 5ad8919d642b646caa3328930dd1a3f290bc587e (diff) |
refactor: use spawn API across codebase (#14414)
Diffstat (limited to 'tools/wpt.ts')
-rwxr-xr-x | tools/wpt.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/wpt.ts b/tools/wpt.ts index 52d57ad28..615fbf752 100755 --- a/tools/wpt.ts +++ b/tools/wpt.ts @@ -90,10 +90,11 @@ async function setup() { `The WPT require certain entries to be present in your ${hostsPath} file. Should these be configured automatically?`, ); if (autoConfigure) { - const proc = runPy(["wpt", "make-hosts-file"], { stdout: "piped" }); - const status = await proc.status(); + const { status, stdout } = await runPy(["wpt", "make-hosts-file"], { + stdout: "piped", + }).output(); assert(status.success, "wpt make-hosts-file should not fail"); - const entries = new TextDecoder().decode(await proc.output()); + const entries = new TextDecoder().decode(stdout); const file = await Deno.open(hostsPath, { append: true }).catch((err) => { if (err instanceof Deno.errors.PermissionDenied) { throw new Error( |