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 26, 2023
1 parent 6549f1e commit 4db6a48
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 @@ -320,25 +320,5 @@ func CreatePolicies(policyScopeMap PolicyScopeMap, policyEventsMap PolicyEventMa
}
}

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)
if err != nil {
return nil, err
}

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

return policies, nil
}

0 comments on commit 4db6a48

Please sign in to comment.