Browse Source

cmd: only print server version when different

Michael Yang 1 year ago
parent
commit
cde13bcdea
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cmd/cmd.go

+ 3 - 1
cmd/cmd.go

@@ -1050,7 +1050,9 @@ func versionHandler(cmd *cobra.Command, _ []string) {
 		return
 	}
 
-	fmt.Printf("server version %s\n", serverVersion)
+	if serverVersion != version.Version {
+		fmt.Printf("ollama host version %s\n", serverVersion)
+	}
 }
 
 func NewCLI() *cobra.Command {