From 838ec9617ab3c0055cc45470f14c127006ed548c Mon Sep 17 00:00:00 2001 From: Rene Date: Wed, 1 Jul 2026 11:29:05 +0200 Subject: [PATCH] Fix ensure-ollama.mjs: sleep -> timeout for Windows compatibility --- scripts/ensure-ollama.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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") }