Skip to content

Commit 462e6d3

Browse files
committed
rp2040load: do not exit if sketch upload fails
1 parent 3cc1371 commit 462e6d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: programmers/rp2040load/rp2040load.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/arduino/arduino-cli/arduino/serialutils"
1010
"github.com/arduino/arduino-cli/executils"
1111
"github.com/arduino/go-paths-helper"
12+
"github.com/pkg/errors"
1213
)
1314

1415
type RP2040Load struct {
@@ -32,7 +33,7 @@ func (b *RP2040Load) Flash(filename string, cb *serialutils.ResetProgressCallbac
3233

3334
log.Println("Flashing " + filename)
3435
if err := b.invoke("-v", "-D", filename); err != nil {
35-
log.Fatalf("Error flashing %s: %s", filename, err)
36+
return errors.Errorf("Error flashing %s: %s", filename, err)
3637
}
3738

3839
time.Sleep(5 * time.Second)

0 commit comments

Comments
 (0)