Skip to content

Commit

Permalink
Fix bug where container-state is ignored when no-follow specified (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
tksm committed Jan 22, 2023
1 parent 2983c8f commit 1bbee8c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stern/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ func ListTargets(ctx context.Context, i corev1client.PodInterface, labelSelector
var targets []*Target
for i := range list.Items {
filter.visit(&list.Items[i], func(t *Target, containerStateMatched bool) {
targets = append(targets, t)
if containerStateMatched {
targets = append(targets, t)
}
})
}
return targets, nil
Expand Down

0 comments on commit 1bbee8c

Please sign in to comment.