Browse Source

read from os executable

Bruce MacDonald 1 year ago
parent
commit
50e87c6691
1 changed files with 5 additions and 1 deletions
  1. 5 1
      cmd/cmd.go

+ 5 - 1
cmd/cmd.go

@@ -527,7 +527,11 @@ func RunServer(_ *cobra.Command, _ []string) error {
 }
 
 func startMacApp(client *api.Client) error {
-	link, err := os.Readlink("/usr/local/bin/ollama")
+	exe, err := os.Executable()
+	if err != nil {
+		return err
+	}
+	link, err := os.Readlink(exe)
 	if err != nil {
 		return err
 	}