Skip to content

Commit b164be5

Browse files
author
zhouhao
committed
validate: fix spec.Linux nil dereference
Signed-off-by: zhouhao <[email protected]>
1 parent f49d861 commit b164be5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

validate/validate.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ func (v *Validator) CheckAll() (msgs []string) {
8989
msgs = append(msgs, v.CheckPlatform()...)
9090
msgs = append(msgs, v.CheckProcess()...)
9191
msgs = append(msgs, v.CheckOS()...)
92-
msgs = append(msgs, v.CheckLinux()...)
9392
msgs = append(msgs, v.CheckHooks()...)
93+
if v.spec.Linux != nil {
94+
msgs = append(msgs, v.CheckLinux()...)
95+
}
9496

9597
return
9698
}

0 commit comments

Comments
 (0)