From f7567e5a69503c944ea45fb665d168ac0f4e6e5a Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 27 May 2023 09:18:17 -0400 Subject: [PATCH] Ignore release notes download when we shouldn't show release notes (#2381) --- Sparkle/SUUpdateAlert.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index ecd36ea6..1c2be459 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -241,6 +241,13 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE - (void)showUpdateReleaseNotesWithDownloadData:(SPUDownloadData *)downloadData { + if (![self showsReleaseNotes]) { + if ([_host.bundle isEqual:NSBundle.mainBundle]) { + SULog(SULogLevelError, @"Warning: '%@' is configured to not show release notes but release notes for version %@ were downloaded. Consider either removing release notes from your appcast or implementing -[SPUUpdaterDelegate updater:shouldDownloadReleaseNotesForUpdate:]", _host.name, _updateItem.displayVersionString); + } + return; + } + NSURL *releaseNotesURL = _updateItem.releaseNotesURL; NSURL *baseURL = releaseNotesURL.URLByDeletingLastPathComponent; // If a MIME type isn't provided, we will pick html as the default, as opposed to plain text. Questionable decision..