Fix call to where.exe on Windows

Signed-off-by: Fred Bricon <fbricon@gmail.com>
This commit is contained in:
Fred Bricon 2025-01-09 14:56:33 +01:00
parent 3e09a43856
commit 4b45666262

View file

@ -4,7 +4,7 @@ import { exec } from "node:child_process";
export async function isOllamaInstalled(): Promise<boolean> {
return new Promise((resolve, _reject) => {
const command = process.platform === "win32" ? "where ollama" : "which ollama";
const command = process.platform === "win32" ? "where.exe ollama" : "which ollama";
exec(command, (error, _stdout, _stderr) => {
resolve(!error);
});