skip vaildations if --force is supplied

pull/8969/head
Priya Wadhwa 2020-08-11 14:16:40 -04:00
parent 8b6a0eb4fb
commit 789dfca804
1 changed files with 4 additions and 0 deletions

View File

@ -940,6 +940,10 @@ func validateCPUCount(drvName string) {
// validateFlags validates the supplied flags against known bad combinations
func validateFlags(cmd *cobra.Command, drvName string) {
if viper.GetBool(force) {
out.WarningT("minikube skips flag validations when --force is supplied; this may lead to unexpected behavior")
return
}
if cmd.Flags().Changed(humanReadableDiskSize) {
diskSizeMB, err := util.CalculateSizeInMB(viper.GetString(humanReadableDiskSize))
if err != nil {