Fix ensure-ollama.mjs: sleep -> timeout for Windows compatibility
Build & Auto-Repair / build (push) Has been cancelled

This commit is contained in:
2026-07-01 11:29:05 +02:00
parent b75351112e
commit 838ec9617a
+5 -1
View File
@@ -50,7 +50,11 @@ if (!isRunning()) {
spawn(bin, ["serve"], { stdio: "ignore", detached: true }).unref() spawn(bin, ["serve"], { stdio: "ignore", detached: true }).unref()
} }
// Give it a moment to start listening // Give it a moment to start listening
execSync("sleep 3", { stdio: "ignore", timeout: 5000 }) if (platform() === "win32") {
execSync("timeout /t 3 /nobreak >nul", { stdio: "ignore", timeout: 10000, shell: true })
} else {
execSync("sleep 3", { stdio: "ignore", timeout: 5000 })
}
} else { } else {
console.log("Ollama already running") console.log("Ollama already running")
} }