Devtools: fix format-staged on Windows

This commit is contained in:
Tak hoffman 2026-01-25 09:41:32 -06:00
parent f9c49a80bb
commit ca6f8148b2

View File

@ -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: [] };
}