Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

remove unused persistent pre run

Michael Yangaba706ea2d26
diff --git a/cmd/cmd.go b/cmd/cmd.go
index 99033614f..344bea524 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -9,7 +9,6 @@ import (
"net"
"net/http"
"os"
- "path/filepath"
"strings"
"time"
@@ -21,15 +20,6 @@ import (
"github.com/jmorganca/ollama/server"
)
-func cacheDir() string {
- home, err := os.UserHomeDir()
- if err != nil {
- panic(err)
- }
-
- return filepath.Join(home, ".ollama")
-}
-
func create(cmd *cobra.Command, args []string) error {
filename, _ := cmd.Flags().GetString("file")
client := api.NewClient()
@@ -255,10 +245,6 @@ func NewCLI() *cobra.Command {
CompletionOptions: cobra.CompletionOptions{
DisableDefaultCmd: true,
},
- PersistentPreRunE: func(_ *cobra.Command, args []string) error {
- // create the models directory and it's parent
- return os.MkdirAll(filepath.Join(cacheDir(), "models"), 0o700)
- },
}
cobra.EnableCommandSorting = false