Skip to content

Commit 73b6992

Browse files
author
zhouhao
committed
validate: add windows validation in checkos
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
1 parent 868323a commit 73b6992

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

validate/validate.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,12 @@ func (v *Validator) CheckOS() (msgs []string) {
400400
}
401401
}
402402

403+
if v.spec.Platform.OS != "windows" {
404+
if v.spec.Windows != nil {
405+
msgs = append(msgs, fmt.Sprintf("'windows' MUST NOT be set when platform.os is %q", v.spec.Platform.OS))
406+
}
407+
}
408+
403409
return
404410
}
405411

0 commit comments

Comments
 (0)