diff options
Diffstat (limited to 'tools/format.js')
-rwxr-xr-x | tools/format.js | 8 |
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); |