From 8a46e78c0f5f05129907da2a81949922d0a66b4b Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 2 Jun 2021 10:56:02 +0200 Subject: [PATCH] Fail update check when the updating indexes fails --- updates/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/updates/main.go b/updates/main.go index 5f2000c6..b3057588 100644 --- a/updates/main.go +++ b/updates/main.go @@ -293,7 +293,7 @@ func checkForUpdates(ctx context.Context) (err error) { notifications.NotifyWarn( updateFailed, "Update Check Failed", - "The Portmaster failed to check for updates. This might be a temporary issue of your device, your network or the update servers. The Portmaster will automatically try again later.", + "The Portmaster failed to check for updates. This might be a temporary issue of your device, your network or the update servers. The Portmaster will automatically try again later. If you just installed the Portmaster, please try disabling potentially conflicting software, such as other firewalls or VPNs.", notifications.Action{ ID: "retry", Text: "Try Again Now", @@ -308,12 +308,13 @@ func checkForUpdates(ctx context.Context) (err error) { }() if err = registry.UpdateIndexes(ctx); err != nil { - log.Warningf("updates: failed to update indexes: %s", err) + err = fmt.Errorf("failed to update indexes: %s", err) + return } err = registry.DownloadUpdates(ctx) if err != nil { - err = fmt.Errorf("failed to update: %w", err) + err = fmt.Errorf("failed to download updates: %w", err) return } @@ -322,7 +323,7 @@ func checkForUpdates(ctx context.Context) (err error) { // Unpack selected resources. err = registry.UnpackResources() if err != nil { - err = fmt.Errorf("failed to update: %w", err) + err = fmt.Errorf("failed to unpack updates: %w", err) return }