Skip to content

Commit 5fa30f4

Browse files
author
zhouhao
committed
validate fix spec.Process.Capabilites nil deference
Signed-off-by: zhouhao <[email protected]>
1 parent b164be5 commit 5fa30f4

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
@@ -261,7 +261,9 @@ func (v *Validator) CheckProcess() (msgs []string) {
261261
}
262262
}
263263

264-
msgs = append(msgs, v.CheckCapabilities()...)
264+
if v.spec.Process.Capabilities != nil {
265+
msgs = append(msgs, v.CheckCapabilities()...)
266+
}
265267
msgs = append(msgs, v.CheckRlimits()...)
266268

267269
if v.spec.Platform.OS == "linux" {

0 commit comments

Comments
 (0)