Skip to content

Upgrade arduino-cli #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More readable init errors
  • Loading branch information
polldo committed Dec 16, 2021
commit a8d23dfad15e2a05ee77c21e998f1ccdc37b5724
6 changes: 5 additions & 1 deletion arduino/cli/commander.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package cli

import (
"context"
"errors"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -52,7 +53,10 @@ func NewCommander() (arduino.Commander, error) {
}
errs := instance.Init(inst)
if len(errs) > 0 {
err = fmt.Errorf("initializing arduino-cli instance: %v", errs)
err = errors.New("initializing arduino-cli instance: received errors: ")
for _, e := range errs {
err = fmt.Errorf("%w%v; ", err, e)
}
return nil, err
}

Expand Down