aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/infra/tunnel/helpers.go')
-rw-r--r--pkg/domain/infra/tunnel/helpers.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go
index 9ff1641f0..20ea07948 100644
--- a/pkg/domain/infra/tunnel/helpers.go
+++ b/pkg/domain/infra/tunnel/helpers.go
@@ -31,8 +31,17 @@ func getContainersAndInputByContext(contextWithConnection context.Context, all,
rawInputs := []string{}
switch {
case len(filters) > 0:
+ namesOrIDs = nil
for i := range allContainers {
- namesOrIDs = append(namesOrIDs, allContainers[i].ID)
+ if len(namesOrIDs) > 0 {
+ for _, name := range namesOrIDs {
+ if name == allContainers[i].ID {
+ namesOrIDs = append(namesOrIDs, allContainers[i].ID)
+ }
+ }
+ } else {
+ namesOrIDs = append(namesOrIDs, allContainers[i].ID)
+ }
}
case all:
for i := range allContainers {