diff --git a/scripts/ensure-ollama.mjs b/scripts/ensure-ollama.mjs index 9a299be..bcee6ef 100644 --- a/scripts/ensure-ollama.mjs +++ b/scripts/ensure-ollama.mjs @@ -50,7 +50,11 @@ if (!isRunning()) { spawn(bin, ["serve"], { stdio: "ignore", detached: true }).unref() } // 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 { console.log("Ollama already running") }