summaryrefslogtreecommitdiff
path: root/tools/format.js
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2022-07-21 14:15:15 +0530
committerGitHub <noreply@github.com>2022-07-21 14:15:15 +0530
commite98e0da8b218aa2b68d82ee7d777f499b10237aa (patch)
tree05cc660c005c35bdc27a4f37be295a0f06a3ccee /tools/format.js
parentf0e01682cce638303e3b6997788667a0f71dff8d (diff)
fix(tools): upgrade to new `Deno.spawn` api (#15265)
Diffstat (limited to 'tools/format.js')
-rwxr-xr-xtools/format.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/format.js b/tools/format.js
index 2cd90f622..fe18352f3 100755
--- a/tools/format.js
+++ b/tools/format.js
@@ -5,12 +5,12 @@ import { getPrebuiltToolPath, join, ROOT_PATH } from "./util.js";
async function dprint() {
const configFile = join(ROOT_PATH, ".dprint.json");
const execPath = getPrebuiltToolPath("dprint");
- const { status } = await Deno.spawn(execPath, {
+ const { success } = await Deno.spawn(execPath, {
args: ["fmt", "--config=" + configFile],
stdout: "inherit",
stderr: "inherit",
});
- if (!status.success) {
+ if (!success) {
throw new Error("dprint failed");
}
}
@@ -20,12 +20,12 @@ async function main() {
await dprint();
if (Deno.args.includes("--check")) {
- const { status, stdout } = await Deno.spawn("git", {
+ const { success, stdout } = await Deno.spawn("git", {
args: ["status", "-uno", "--porcelain", "--ignore-submodules"],
stderr: "inherit",
});
- if (!status.success) {
+ if (!success) {
throw new Error("git status failed");
}
const out = new TextDecoder().decode(stdout);