fix(tauri): no Windows usa cmd /C tauri.cmd para evitar EINVAL
This commit is contained in:
parent
ff68348442
commit
a5acc87588
1 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue