Add text option

pull/8663/head
Priya Wadhwa 2020-07-10 16:31:15 -04:00
parent b9cd0caa7c
commit 589b6b0340
2 changed files with 5 additions and 1 deletions

View File

@ -911,6 +911,10 @@ func validateFlags(cmd *cobra.Command, drvName string) {
} }
} }
if s := viper.GetString(startOutput); s != "text" && s != "json" {
exit.UsageT("Sorry, please set the --output flag to one of the following valid options: [text,json]")
}
validateRegistryMirror() validateRegistryMirror()
} }

View File

@ -145,7 +145,7 @@ func initMinikubeFlags() {
startCmd.Flags().Bool(preload, true, "If set, download tarball of preloaded images if available to improve start time. Defaults to true.") startCmd.Flags().Bool(preload, true, "If set, download tarball of preloaded images if available to improve start time. Defaults to true.")
startCmd.Flags().Bool(deleteOnFailure, false, "If set, delete the current cluster if start fails and try again. Defaults to false.") startCmd.Flags().Bool(deleteOnFailure, false, "If set, delete the current cluster if start fails and try again. Defaults to false.")
startCmd.Flags().Bool(forceSystemd, false, "If set, force the container runtime to use sytemd as cgroup manager. Currently available for docker and crio. Defaults to false.") startCmd.Flags().Bool(forceSystemd, false, "If set, force the container runtime to use sytemd as cgroup manager. Currently available for docker and crio. Defaults to false.")
startCmd.Flags().String(startOutput, "", "Format to print stdout in. Options include: [json]") startCmd.Flags().String(startOutput, "text", "Format to print stdout in. Options include: [text,json]")
} }
// initKubernetesFlags inits the commandline flags for Kubernetes related options // initKubernetesFlags inits the commandline flags for Kubernetes related options