Change 'minikube version --short' to only print the version without a prompt.
parent
24a759fb51
commit
810f7ab108
|
@ -45,9 +45,13 @@ var versionCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
switch versionOutput {
|
switch versionOutput {
|
||||||
case "":
|
case "":
|
||||||
out.Ln("minikube version: %v", minikubeVersion)
|
if !shortVersion {
|
||||||
if !shortVersion && gitCommitID != "" {
|
out.Ln("minikube version: %v", minikubeVersion)
|
||||||
out.Ln("commit: %v", gitCommitID)
|
if gitCommitID != "" {
|
||||||
|
out.Ln("commit: %v", gitCommitID)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Ln("%v", minikubeVersion)
|
||||||
}
|
}
|
||||||
case "json":
|
case "json":
|
||||||
json, err := json.Marshal(data)
|
json, err := json.Marshal(data)
|
||||||
|
|
Loading…
Reference in New Issue