Fix update check failing for large numbers of plugins, with little or no feedback on the error. Closes #2118

This commit is contained in:
kaidaguerre
2022-05-25 17:56:48 +01:00
committed by GitHub
parent ea40caa9c0
commit e0ed768942
5 changed files with 31 additions and 32 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"strings"
"sync"
"time"
"github.com/gosuri/uiprogress"
"github.com/gosuri/uiprogress/util/strutil"
@@ -362,7 +363,9 @@ func runPluginUpdateCmd(cmd *cobra.Command, args []string) {
return
}
statusSpinner := statushooks.NewStatusSpinner(statushooks.WithMessage("Checking for available updates"))
reports := plugin.GetUpdateReport(state.InstallationID, runUpdatesFor)
// long timeout - we are happy to wait
timeout := 30 * time.Second
reports := plugin.GetUpdateReport(state.InstallationID, runUpdatesFor, timeout)
statusSpinner.Done()
if len(reports) == 0 {