Skip to content

Commit 798324d

Browse files
committed
platform config could exist even platform is different
Signed-off-by: liangchenye <[email protected]>
1 parent ca03d44 commit 798324d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

validate/validate.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -412,26 +412,10 @@ func (v *Validator) CheckPlatform() (msgs []string) {
412412
return
413413
}
414414

415-
if v.platform != "linux" {
416-
if v.spec.Linux != nil {
417-
msgs = append(msgs, fmt.Sprintf("'linux' MUST NOT be set when target platform is %q", v.platform))
418-
}
419-
}
420-
421-
if v.platform != "solaris" {
422-
if v.spec.Solaris != nil {
423-
msgs = append(msgs, fmt.Sprintf("'solaris' MUST NOT be set when target platform is %q", v.platform))
424-
}
425-
}
426-
427415
if v.platform == "windows" {
428416
if v.spec.Windows == nil {
429417
msgs = append(msgs, "'windows' MUST be set when platform is `windows`")
430418
}
431-
} else {
432-
if v.spec.Windows != nil {
433-
msgs = append(msgs, fmt.Sprintf("'windows' MUST NOT be set when target platform is %q", v.platform))
434-
}
435419
}
436420

437421
return

0 commit comments

Comments
 (0)