Skip to content

Commit 0e6dea5

Browse files
committed
fix getting started failing if the board is in bootloader mode
1 parent 447aa03 commit 0e6dea5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: upload/upload.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,14 @@ func Kill() {
150150
// sometimes) and an error (usually because the port listing failed)
151151
func reset(port string, wait bool, l Logger) (string, error) {
152152
info(l, "Restarting in bootloader mode")
153-
port, err := serialutils.Reset(port, wait, nil) // TODO use callbacks to print as the cli does
153+
newPort, err := serialutils.Reset(port, wait, nil) // TODO use callbacks to print as the cli does
154154
if err != nil {
155155
info(l, err)
156156
return "", err
157157
}
158+
if newPort != "" {
159+
port = newPort
160+
}
158161
return port, nil
159162
}
160163

0 commit comments

Comments
 (0)