1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00

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 GitHub
parent cf33720a85
commit bfdce3cc35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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) {