From dc8fc5f81f6426bdc1dddbdd5f822f201a623aa3 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Sun, 24 Sep 2023 15:05:39 +0000 Subject: [PATCH] feat(updater): log warning about using `-minratio` --- internal/updater/providers.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/updater/providers.go b/internal/updater/providers.go index 679e6c85..fab84847 100644 --- a/internal/updater/providers.go +++ b/internal/updater/providers.go @@ -7,6 +7,7 @@ import ( "fmt" "github.com/qdm12/gluetun/internal/models" + "github.com/qdm12/gluetun/internal/provider/common" ) type Provider interface { @@ -23,6 +24,10 @@ func (u *Updater) updateProvider(ctx context.Context, provider Provider, minServers := int(minRatio * float64(existingServersCount)) servers, err := provider.FetchServers(ctx, minServers) if err != nil { + if errors.Is(err, common.ErrNotEnoughServers) { + u.logger.Warn("note: if running the update manually, you can use the flag " + + "-minratio to allow the update to succeed with less servers found") + } return fmt.Errorf("getting servers: %w", err) }