Skip to content

Commit

Permalink
Comparing and returning slices more appropriately
Browse files Browse the repository at this point in the history
  • Loading branch information
100mik committed Feb 9, 2022
1 parent eff69cf commit eeeceb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/kapp/cmd/app/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ func (o *DeployOptions) newAndUsedGKs(newGKs []schema.GroupKind, app ctlapp.App)
if err != nil {
return nil, err
}
if usedGKs == nil && lastChange != nil {
return nil, nil
if len(usedGKs) == 0 && lastChange != nil {
return []schema.GroupKind{}, nil
}

for _, gk := range usedGKs {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kapp/resources/identified_resources_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (r IdentifiedResources) List(labelSelector labels.Selector, resRefs []Resou
schema.GroupVersionResource{Version: "v1", Resource: "componentstatuses"},
})

if opts.GKsScope != nil {
if len(opts.GKsScope) > 0 {
resTypes = MatchingAnyGK(resTypes, opts.GKsScope)
}

Expand Down

0 comments on commit eeeceb3

Please sign in to comment.