Skip to content

Commit

Permalink
fix: instance cleanup without scope (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel authored Nov 11, 2023
1 parent 14a468d commit a047c7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/actions/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ func CheckForSanity(client container.Client, filter types.Filter, rollingRestart
// will stop and remove all but the most recently started container. This behaviour can be bypassed
// if a scope UID is defined.
func CheckForMultipleWatchtowerInstances(client container.Client, cleanup bool, scope string) error {
containers, err := client.ListContainers(filters.FilterByScope(scope, filters.WatchtowerContainersFilter))
filter := filters.WatchtowerContainersFilter
if scope != "" {
filter = filters.FilterByScope(scope, filter)
}
containers, err := client.ListContainers(filter)

if err != nil {
return err
Expand Down

0 comments on commit a047c7f

Please sign in to comment.