From a5acc875887acbe3595ea8e35822503163134f8d Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Tue, 25 Nov 2025 13:56:35 -0300 Subject: [PATCH] fix(tauri): no Windows usa cmd /C tauri.cmd para evitar EINVAL --- apps/desktop/scripts/tauri-with-stub.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/desktop/scripts/tauri-with-stub.mjs b/apps/desktop/scripts/tauri-with-stub.mjs index 459cd17..0c95f55 100644 --- a/apps/desktop/scripts/tauri-with-stub.mjs +++ b/apps/desktop/scripts/tauri-with-stub.mjs @@ -26,8 +26,10 @@ if (!process.env.TAURI_BUNDLE_TARGETS) { } const winTauriPath = resolve(appRoot, "node_modules", ".bin", "tauri.cmd") -const executable = process.platform === "win32" && existsSync(winTauriPath) ? winTauriPath : "tauri" -const child = spawn(executable, process.argv.slice(2), { +const usingWinTauri = process.platform === "win32" && existsSync(winTauriPath) +const executable = process.platform === "win32" && usingWinTauri ? "cmd.exe" : "tauri" +const args = process.platform === "win32" && usingWinTauri ? ["/C", `"${winTauriPath}"`, ...process.argv.slice(2)] : process.argv.slice(2) +const child = spawn(executable, args, { stdio: "inherit", shell: false, cwd: appRoot,