Skip to content

Commit 3c88654

Browse files
authored
chore: temp fix for tools/format.js (#21360)
1 parent 537e032 commit 3c88654

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ data-url.workspace = true
8282
dissimilar = "=1.0.4"
8383
dotenvy = "0.15.7"
8484
dprint-plugin-json = "=0.19.1"
85+
dprint-plugin-jupyter = "=0.1.1"
8586
dprint-plugin-markdown = "=0.16.3"
8687
dprint-plugin-typescript = "=0.88.5"
87-
dprint-plugin-jupyter = "=0.1.1"
8888
encoding_rs.workspace = true
8989
env_logger = "=0.10.0"
9090
fancy-regex = "=0.10.0"

tools/format.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@ const cmd = new Deno.Command("deno", {
1414
"--config=" + configFile,
1515
],
1616
cwd: ROOT_PATH,
17-
stdout: "inherit",
17+
stdout: "piped",
1818
stderr: "inherit",
1919
});
2020

21-
const { code } = await cmd.output();
22-
Deno.exit(code);
21+
const { code, stdout } = await cmd.output();
22+
// todo(dsherret): temporary until https://github.com/denoland/deno/pull/21359 gets released.
23+
// Once it's released, just have stdout be inherited above and do `Deno.exit(code)` here.
24+
const stdoutText = new TextDecoder().decode(stdout);
25+
console.log(stdoutText);
26+
if (stdoutText.length > 0) {
27+
Deno.exit(20);
28+
} else {
29+
Deno.exit(code);
30+
}

0 commit comments

Comments
 (0)