Skip to content

Commit 766302b

Browse files
committed
generate: do not validate caps when being dropped
There's actually little value in erroring out when asked to drop a capability not supported on a system. This patch simply removes the cap validation and just go ahead and drop the capability. Signed-off-by: Antonio Murdaca <[email protected]>
1 parent 06bd267 commit 766302b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ func (g *Generator) AddProcessCapability(c string) error {
10291029
// DropProcessCapability drops a process capability from g.spec.Process.Capabilities.
10301030
func (g *Generator) DropProcessCapability(c string) error {
10311031
cp := strings.ToUpper(c)
1032-
if err := validate.CapValid(cp, g.HostSpecific); err != nil {
1032+
if err := validate.CapValid(cp, false); err != nil {
10331033
return err
10341034
}
10351035

0 commit comments

Comments
 (0)