Skip to content

Commit fed8106

Browse files
authored
fix(pkg/board): invalid join host port
1 parent 416a3c8 commit fed8106

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/board/board.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"io"
99
"log/slog"
10+
"net"
1011
"os/exec"
1112
"regexp"
1213
"slices"
@@ -224,7 +225,7 @@ func (b *Board) GetConnection(optPassword ...string) (remote.RemoteConn, error)
224225
case SerialProtocol:
225226
return adb.FromSerial(b.Serial, "")
226227
case NetworkProtocol:
227-
return ssh.FromHost("arduino", password, b.Address+":22")
228+
return ssh.FromHost("arduino", password, net.JoinHostPort(b.Address, "22"))
228229
case LocalProtocol:
229230
return &local.LocalConnection{}, nil
230231
default:

0 commit comments

Comments
 (0)