From 0e6dea5c5392a20e38daacd1e3f2f4b2402cbc57 Mon Sep 17 00:00:00 2001 From: umbynos Date: Mon, 19 Apr 2021 17:34:29 +0200 Subject: [PATCH] fix getting started failing if the board is in bootloader mode --- upload/upload.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upload/upload.go b/upload/upload.go index b95e05af1..ffc2631b6 100644 --- a/upload/upload.go +++ b/upload/upload.go @@ -150,11 +150,14 @@ func Kill() { // sometimes) and an error (usually because the port listing failed) func reset(port string, wait bool, l Logger) (string, error) { info(l, "Restarting in bootloader mode") - port, err := serialutils.Reset(port, wait, nil) // TODO use callbacks to print as the cli does + newPort, err := serialutils.Reset(port, wait, nil) // TODO use callbacks to print as the cli does if err != nil { info(l, err) return "", err } + if newPort != "" { + port = newPort + } return port, nil }