From 4c1dc52083d53a90a1e9d90160e876af3f7bf786 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 18 Jul 2023 22:50:45 -0700 Subject: [PATCH] app: create `/usr/local/bin/` if it does not exist --- app/src/install.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/install.ts b/app/src/install.ts index c08aff59..e3486b77 100644 --- a/app/src/install.ts +++ b/app/src/install.ts @@ -13,7 +13,9 @@ export function installed() { } export async function install() { - const command = `do shell script "ln -F -s ${ollama} ${symlinkPath}" with administrator privileges` + const command = `do shell script "mkdir -p ${path.dirname( + symlinkPath + )} && ln -F -s ${ollama} ${symlinkPath}" with administrator privileges` try { await exec(`osascript -e '${command}'`)