Allow CPU count check to be disabled using --force

pull/5803/head
tstromberg 2019-10-31 11:28:34 -07:00
parent fc8e032bdc
commit 9cfd2073ba
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@ func validateFlags(drvName string) {
} else {
cpuCount = viper.GetInt(cpus)
}
if cpuCount < minimumCPUS {
if cpuCount < minimumCPUS && !viper.GetBool(force) {
exit.UsageT("Requested cpu count {{.requested_cpus}} is less than the minimum allowed of {{.minimum_cpus}}", out.V{"requested_cpus": cpuCount, "minimum_cpus": minimumCPUS})
}