瀏覽代碼

app: create `/usr/local/bin/` if it does not exist

Jeffrey Morgan 1 年之前
父節點
當前提交
4c1dc52083
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/install.ts

+ 3 - 1
app/src/install.ts

@@ -13,7 +13,9 @@ export function installed() {
 }
 }
 
 
 export async function install() {
 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 {
   try {
     await exec(`osascript -e '${command}'`)
     await exec(`osascript -e '${command}'`)