mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Handle defer installation when resuming updates in sparkle-cli
This commit is contained in:
1 parent
7d1c0aa83b
commit
80bc8353ed
1 file changed
+10
-1
@@ -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];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user