Fix cli version comparison and improve setup command (#3518)

This commit is contained in:
Anbraten
2024-03-28 10:36:39 +01:00
committed by GitHub
parent 0b76e465c1
commit c2a8464512
11 changed files with 155 additions and 165 deletions

View File

@@ -37,7 +37,7 @@ func Before(c *cli.Context) error {
log.Debug().Msg("Checking for updates ...")
newVersion, err := update.CheckForUpdate(waitForUpdateCheck, true)
newVersion, err := update.CheckForUpdate(waitForUpdateCheck, false)
if err != nil {
log.Error().Err(err).Msgf("Failed to check for updates")
return
@@ -58,7 +58,7 @@ func After(_ *cli.Context) error {
select {
case <-waitForUpdateCheck.Done():
// When the actual command already finished, we still wait 250ms for the update check to finish
case <-time.After(time.Millisecond * 250):
case <-time.After(time.Millisecond * 500):
log.Debug().Msg("Update check stopped due to timeout")
cancelWaitForUpdate(errors.New("update check timeout"))
}