Skip to content

Commit 361607c

Browse files
authored
Merge pull request #2536 from alexissellier/fix-reverse-ports-multi-containers
fix: check for correct devcontainer reverse ports
2 parents e6d1eeb + 456f661 commit 361607c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

pkg/devspace/services/portforwarding/portforwarding.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package portforwarding
22

33
import (
44
"fmt"
5+
"strings"
6+
"time"
7+
58
"github.com/loft-sh/devspace/helper/util/port"
69
"github.com/loft-sh/devspace/pkg/devspace/config/loader"
710
"github.com/loft-sh/devspace/pkg/devspace/kubectl"
811
"github.com/loft-sh/devspace/pkg/devspace/kubectl/portforward"
912
"github.com/loft-sh/devspace/pkg/util/tomb"
1013
"github.com/mgutz/ansi"
11-
"strings"
12-
"time"
1314

1415
"github.com/loft-sh/devspace/pkg/devspace/config/versions/latest"
1516
devspacecontext "github.com/loft-sh/devspace/pkg/devspace/context"
@@ -35,7 +36,7 @@ func StartPortForwarding(ctx devspacecontext.Context, devPod *latest.DevPod, sel
3536

3637
// reverse
3738
loader.EachDevContainer(devPod, func(devContainer *latest.DevContainer) bool {
38-
if len(devPod.ReversePorts) > 0 {
39+
if len(devContainer.ReversePorts) > 0 {
3940
initDoneArray = append(initDoneArray, parent.NotifyGo(func() error {
4041
return startReversePortForwardingWithHooks(ctx, devPod.Name, string(devContainer.Arch), devContainer.ReversePorts, selector.WithContainer(devContainer.Container), parent)
4142
}))

0 commit comments

Comments
 (0)