1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

chore: update format script (#21811)

The PR referenced has been released so we can update this now.
This commit is contained in:
David Sherret 2024-01-05 11:02:37 -05:00 committed by Bartek Iwańczuk
parent d3e1387ebb
commit 0a40c3c003
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -9,22 +9,14 @@ const cmd = new Deno.Command("deno", {
"run",
"-A",
"--no-config",
"npm:dprint@0.43.0",
"npm:dprint@0.45.0",
subcommand,
"--config=" + configFile,
],
cwd: ROOT_PATH,
stdout: "piped",
stdout: "inherit",
stderr: "inherit",
});
const { code, stdout } = await cmd.output();
// todo(dsherret): temporary until https://github.com/denoland/deno/pull/21359 gets released.
// Once it's released, just have stdout be inherited above and do `Deno.exit(code)` here.
const stdoutText = new TextDecoder().decode(stdout);
console.log(stdoutText);
if (stdoutText.length > 0) {
Deno.exit(20);
} else {
Deno.exit(code);
}
const { code } = await cmd.output();
Deno.exit(code);