From c9c1de30e45fae4db5a3883de03146e43e6dbf9a Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 6 May 2016 19:35:13 -0400 Subject: [PATCH] Don't implement failedToDownloadUpdate delegate It's not necessary and won't be invoked before user driver shows the error. --- sparkle-cli/SUCommandLineDriver.m | 10 ---------- sparkle-cli/SUCommandLineUserDriver.m | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sparkle-cli/SUCommandLineDriver.m b/sparkle-cli/SUCommandLineDriver.m index 2b92fc19..3a92f84c 100644 --- a/sparkle-cli/SUCommandLineDriver.m +++ b/sparkle-cli/SUCommandLineDriver.m @@ -80,16 +80,6 @@ } } -- (void)updater:(SUUpdater *)__unused updater failedToDownloadUpdate:(SUAppcastItem *)__unused item error:(NSError *)error -{ - if (self.probingForUpdates) { - if (self.verbose) { - fprintf(stderr, "Failed to download update with error (%ld): %s\n", (long)error.code, error.localizedDescription.UTF8String); - } - exit(EXIT_FAILURE); - } -} - - (void)updater:(SUUpdater *)__unused updater didAbortWithError:(NSError *)error { if (self.probingForUpdates) { diff --git a/sparkle-cli/SUCommandLineUserDriver.m b/sparkle-cli/SUCommandLineUserDriver.m index 8872070d..ea6f43bb 100644 --- a/sparkle-cli/SUCommandLineUserDriver.m +++ b/sparkle-cli/SUCommandLineUserDriver.m @@ -142,7 +142,7 @@ - (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))__unused acknowledgement { dispatch_async(dispatch_get_main_queue(), ^{ - fprintf(stderr, "Error: Update check has failed: %s\n", error.description.UTF8String); + fprintf(stderr, "Error: Update has failed: %s\n", error.description.UTF8String); exit(EXIT_FAILURE); }); }