Skip to content

Commit 9ca529b

Browse files
committed
fix(remoteaccess): ignore empty ssh port forwarding values
1 parent ffce564 commit 9ca529b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cmd/remoteaccess/connect/ssh/ssh.manual.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ func NewCmdSSH(f *cmdutil.Factory) *CmdSSH {
107107
func (n *CmdSSH) GetPortForwarding() string {
108108
// convenience functions to mirror docker port mapping options
109109
portMapping := n.portForwarding
110+
111+
if portMapping == "" {
112+
return portMapping
113+
}
114+
110115
portForwardingParts := strings.Split(portMapping, ":")
111116
switch len(portForwardingParts) {
112117
case 1:

0 commit comments

Comments
 (0)