chore(tools): update wpt setup to new spawn api (#15407)

This commit is contained in:
Nayeem Rahman 2022-08-05 11:48:54 +01:00 committed by David Sherret
parent 44ade24fb2
commit 67f75091ca

View File

@ -90,10 +90,10 @@ async function setup() {
`The WPT require certain entries to be present in your ${hostsPath} file. Should these be configured automatically?`,
);
if (autoConfigure) {
const { status, stdout } = await runPy(["wpt", "make-hosts-file"], {
const { success, stdout } = await runPy(["wpt", "make-hosts-file"], {
stdout: "piped",
}).output();
assert(status.success, "wpt make-hosts-file should not fail");
assert(success, "wpt make-hosts-file should not fail");
const entries = new TextDecoder().decode(stdout);
const file = await Deno.open(hostsPath, { append: true }).catch((err) => {
if (err instanceof Deno.errors.PermissionDenied) {