Skip to content

Commit

Permalink
rp2040load: do not exit if sketch upload fails
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed May 10, 2021
1 parent 3cc1371 commit 462e6d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion programmers/rp2040load/rp2040load.go
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/arduino/arduino-cli/arduino/serialutils"
"github.com/arduino/arduino-cli/executils"
"github.com/arduino/go-paths-helper"
"github.com/pkg/errors"
)

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

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

time.Sleep(5 * time.Second)
Expand Down

0 comments on commit 462e6d3

Please sign in to comment.