Merge pull request #2949 from yanfeng1992/fixbug-unjoin-wait

CommandUnjoinOption wait must be a positive duration
This commit is contained in:
karmada-bot 2022-12-14 14:09:22 +08:00 committed by GitHub
commit e47d6cb71b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ func (j *CommandUnjoinOption) Validate(args []string) error {
if len(j.ClusterName) == 0 {
return fmt.Errorf("cluster name is required")
}
if j.Wait < 0 {
if j.Wait <= 0 {
return fmt.Errorf(" --wait %v must be a positive duration, e.g. 1m0s ", j.Wait)
}
return nil