"examples/python/visualization_utils.ipynb" did not exist on "20a771e5143c6867eee63868c38a5bcc272a35e7"
Commit 148f0225 authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

create `.ollama` directory if it doesnt exist

parent 4e07941b
......@@ -9,7 +9,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
......@@ -62,9 +61,14 @@ func getAuthToken(redirData AuthRedirect, regOpts *RegistryOptions) (string, err
return "", err
}
keyPath := path.Join(home, ".ollama/id_ed25519")
keyPath := path.Join(home, ".ollama", "id_ed25519")
rawKey, err := ioutil.ReadFile(keyPath)
err = os.MkdirAll(path.Dir(keyPath), 0700)
if err != nil {
return "", fmt.Errorf("could not create .ollama directory %w", err)
}
rawKey, err := os.ReadFile(keyPath)
if err != nil {
log.Printf("Failed to load private key: %v", err)
return "", err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment