summaryrefslogtreecommitdiff
path: root/tools/format.js
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-11-27 17:51:00 -0500
committerGitHub <noreply@github.com>2023-11-27 22:51:00 +0000
commit3c8865455243c91105ab309de973d68c9db349d4 (patch)
tree23df2eb866cba08ae483c67b38b03c848748cc8c /tools/format.js
parent537e0320f0424aee620e5fcd3d61e0166c810805 (diff)
chore: temp fix for tools/format.js (#21360)
Diffstat (limited to 'tools/format.js')
-rwxr-xr-xtools/format.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/format.js b/tools/format.js
index aff07702b..98da6662b 100755
--- a/tools/format.js
+++ b/tools/format.js
@@ -14,9 +14,17 @@ const cmd = new Deno.Command("deno", {
"--config=" + configFile,
],
cwd: ROOT_PATH,
- stdout: "inherit",
+ stdout: "piped",
stderr: "inherit",
});
-const { code } = await cmd.output();
-Deno.exit(code);
+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);
+}