Skip to content

Commit

Permalink
chore: update format script (denoland#21811)
Browse files Browse the repository at this point in the history
The PR referenced has been released so we can update this now.
  • Loading branch information
dsherret committed Jan 5, 2024
1 parent 824f4fa commit 7c5c502
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tools/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 7c5c502

Please sign in to comment.