From 03eca6ea544766939dd6f7bda34f3f697affac0d Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 6 Jul 2023 12:17:42 -0400 Subject: [PATCH] fix path to `ollama` --- app/src/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/index.ts b/app/src/index.ts index d009e26f..e344483e 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -37,10 +37,10 @@ const createWindow = (): void => { mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY) } +const ollama = path.join(process.resourcesPath, 'ollama') + // if the app is packaged then run the server if (app.isPackaged) { - const ollama = path.join(process.resourcesPath, 'ollama') - // Start the executable console.log(`Starting server`) const proc = spawn(ollama, ['serve']) @@ -66,9 +66,8 @@ function installCLI() { }) .then(result => { if (result.response === 0) { - let resourcePath = path.join(process.resourcesPath, 'your_binary') let command = ` - do shell script "ln -F -s ${resourcePath} /usr/local/bin/ollama" with administrator privileges + do shell script "ln -F -s ${ollama} /usr/local/bin/ollama" with administrator privileges ` exec(`osascript -e '${command}'`, (error: Error | null, stdout: string, stderr: string) => {