From ca6f8148b29823fc85fadd11e8a71dafbdcfb2e4 Mon Sep 17 00:00:00 2001 From: Tak hoffman Date: Sun, 25 Jan 2026 09:41:32 -0600 Subject: [PATCH] Devtools: fix format-staged on Windows --- scripts/format-staged.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/format-staged.js b/scripts/format-staged.js index 0ad2d7dd7..5a524f821 100644 --- a/scripts/format-staged.js +++ b/scripts/format-staged.js @@ -61,6 +61,9 @@ function resolveOxfmtCommand(repoRoot) { const binName = process.platform === "win32" ? "oxfmt.cmd" : "oxfmt"; const local = path.join(repoRoot, "node_modules", ".bin", binName); if (fs.existsSync(local)) { + if (process.platform === "win32" && local.toLowerCase().endsWith(".cmd")) { + return { command: "cmd.exe", args: ["/d", "/s", "/c", local] }; + } return { command: local, args: [] }; }