Skip to content

Commit 60c1c98

Browse files
authored
Do not abort build if loading errors happens for not compiled platforms (#1606)
This is mostly useful for "arduino-builder".
1 parent 4506bf9 commit 60c1c98

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: legacy/builder/hardware_loader.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package builder
1818
import (
1919
"github.com/arduino/arduino-cli/arduino/cores/packagemanager"
2020
"github.com/arduino/arduino-cli/legacy/builder/types"
21-
"github.com/pkg/errors"
2221
)
2322

2423
type HardwareLoader struct{}
@@ -33,7 +32,13 @@ func (s *HardwareLoader) Run(ctx *types.Context) error {
3332
// I have no intention right now to start a refactoring of the legacy package too, so
3433
// here's this shitty solution for now.
3534
// When we're gonna refactor the legacy package this will be gone.
36-
return errors.WithStack(errs[0].Err())
35+
36+
if ctx.Verbose {
37+
log := ctx.GetLogger()
38+
for _, err := range errs {
39+
log.Println("info", "Error loading hardware platform: {0}", err.Message())
40+
}
41+
}
3742
}
3843
ctx.PackageManager = pm
3944
}

0 commit comments

Comments
 (0)