Handle defer installation when resuming updates in sparkle-cli

This commit is contained in:
Zorg committed 2016-07-12 19:50:00 -04:00
1 parent 7d1c0aa83b
commit 80bc8353ed
1 file changed
+10 -1
+10 -1
View File
@@ -152,8 +152,17 @@
- (void)showResumableUpdateFoundWithAppcastItem:(SUAppcastItem *)appcastItem reply:(void (^)(SUInstallUpdateStatus))reply
{
dispatch_async(dispatch_get_main_queue(), ^{
[self.coreComponent registerInstallUpdateHandler:reply];
[self showUpdateWithAppcastItem:appcastItem updateAdjective:@"resumable"];
reply(SUInstallAndRelaunchUpdateNow);
if (self.deferInstallation) {
if (self.verbose) {
fprintf(stderr, "Deferring Installation.\n");
}
[self.coreComponent installUpdateWithChoice:SUDismissUpdateInstallation];
} else {
[self.coreComponent installUpdateWithChoice:SUInstallAndRelaunchUpdateNow];
}
});
}