read from os executable

This commit is contained in:
Bruce MacDonald 2023-08-01 16:01:55 -04:00
parent 765994362c
commit 50e87c6691

View file

@ -527,7 +527,11 @@ func RunServer(_ *cobra.Command, _ []string) error {
} }
func startMacApp(client *api.Client) 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 { if err != nil {
return err return err
} }