summaryrefslogtreecommitdiff
path: root/tools/format.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/format.js')
-rwxr-xr-xtools/format.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/format.js b/tools/format.js
index b2296ede6..aff07702b 100755
--- a/tools/format.js
+++ b/tools/format.js
@@ -1,12 +1,18 @@
#!/usr/bin/env -S deno run --unstable --allow-write --allow-read --allow-run --allow-net
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
-import { getPrebuilt, join, ROOT_PATH } from "./util.js";
+import { join, ROOT_PATH } from "./util.js";
const subcommand = Deno.args.includes("--check") ? "check" : "fmt";
const configFile = join(ROOT_PATH, ".dprint.json");
-const execPath = await getPrebuilt("dprint");
-const cmd = new Deno.Command(execPath, {
- args: [subcommand, "--config=" + configFile],
+const cmd = new Deno.Command("deno", {
+ args: [
+ "run",
+ "-A",
+ "--no-config",
+ "npm:dprint@0.43.0",
+ subcommand,
+ "--config=" + configFile,
+ ],
cwd: ROOT_PATH,
stdout: "inherit",
stderr: "inherit",