Skip to content

Commit

Permalink
chore(flags): remove leftover
Browse files Browse the repository at this point in the history
After the changes of aquasecurity#3262, at this stage, policies.Map() length is
always greater than 0.
  • Loading branch information
geyslan committed Oct 10, 2023
1 parent dde824c commit 6ce8a36
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pkg/cmd/flags/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,25 +325,5 @@ func CreatePolicies(
}
}

if len(policies.Map()) == 0 {
// if nothing was set, let us consider it as a single default policy
eventFilter := eventFilter{
Equal: []string{},
NotEqual: []string{},
}

var err error
newPolicy := policy.NewPolicy()
newPolicy.EventsToTrace, err = prepareEventsToTrace(eventFilter, eventsNameToID, evtsToDisable)
if err != nil {
return nil, err
}

err = policies.Add(newPolicy)
if err != nil {
return nil, err
}
}

return policies, nil
}

0 comments on commit 6ce8a36

Please sign in to comment.