Skip to content
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
9 changes: 9 additions & 0 deletions internal/update/arduino/arduino.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ func (a *ArduinoPlatformUpdater) ListUpgradablePackages(ctx context.Context, _ f
return nil, err
}

streamLibIndex, _ := commands.UpdateLibrariesIndexStreamResponseToCallbackFunction(ctx, func(curr *rpc.DownloadProgress) {
slog.Debug("downloading library index", "progress", curr.GetMessage())
})

req := &rpc.UpdateLibrariesIndexRequest{Instance: inst, UpdateIfOlderThanSecs: 0}
if err := srv.UpdateLibrariesIndex(req, streamLibIndex); err != nil {
slog.Warn("error updating library index, skipping", slog.String("error", err.Error()))
}

if err := srv.Init(
&rpc.InitRequest{Instance: inst},
commands.InitStreamResponseToCallbackFunction(ctx, func(r *rpc.InitResponse) error {
Expand Down