Fix ensure-ollama.mjs: sleep -> timeout for Windows compatibility
Build & Auto-Repair / build (push) Has been cancelled
Build & Auto-Repair / build (push) Has been cancelled
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user