mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-27 05:04:27 +00:00
Change try again error to authorize later error
This commit is contained in:
1 parent
c2db46f656
commit
41ee168f2c
8 files changed
+9
-9
No files matched your search
@@ -13,5 +13,5 @@ typedef NS_ENUM(NSUInteger, SUAuthorizationReply)
|
||||
SUAuthorizationReplySuccess = 0,
|
||||
SUAuthorizationReplyCancelled = 1,
|
||||
SUAuthorizationReplyFailure = 2,
|
||||
SUAuthorizationReplyTryAgainLater = 3
|
||||
SUAuthorizationReplyAuthorizeLater = 3
|
||||
};
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
|
||||
if (needsSystemAuthorization && !preflighted && !allowingInteraction) {
|
||||
completionHandler(SUAuthorizationReplyTryAgainLater);
|
||||
completionHandler(SUAuthorizationReplyAuthorizeLater);
|
||||
} else {
|
||||
BOOL submittedProgressTool = [self submitProgressToolAtPath:progressToolPath withHostBundle:hostBundle allowingInteraction:allowingInteraction installerPath:installerPath shouldSubmitInstaller:!shouldSubmitInstallerImmediately];
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -124,7 +124,7 @@
|
||||
|
||||
- (void)abortUpdateWithError:(NSError *)error
|
||||
{
|
||||
BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationTryAgainLaterError) && (!self.willInstallSilently || self.updateItem.isCriticalUpdate);
|
||||
BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationAuthorizeLaterError) && (!self.willInstallSilently || self.updateItem.isCriticalUpdate);
|
||||
[self.coreDriver abortUpdateAndShowNextUpdateImmediately:showNextUpdateImmediately error:error];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -156,7 +156,7 @@
|
||||
- (void)abortUpdateAndShowNextUpdateImmediately:(BOOL)shouldShowUpdateImmediately downloadedUpdate:(SUDownloadedUpdate * _Nullable)downloadedUpdate error:(nullable NSError *)error
|
||||
{
|
||||
if (error != nil) {
|
||||
if (error.code != SUNoUpdateError && error.code != SUInstallationCancelledError && error.code != SUInstallationTryAgainLaterError) { // Let's not bother logging this.
|
||||
if (error.code != SUNoUpdateError && error.code != SUInstallationCancelledError && error.code != SUInstallationAuthorizeLaterError) { // Let's not bother logging this.
|
||||
NSError *errorToDisplay = error;
|
||||
int finiteRecursion=5;
|
||||
do {
|
||||
|
||||
Vendored
+1
-1
@@ -285,7 +285,7 @@
|
||||
[self.installerDriver abortInstall];
|
||||
[self.downloadDriver cleanup];
|
||||
|
||||
SUDownloadedUpdate *downloadedUpdate = (error == nil || error.code == SUInstallationTryAgainLaterError) ? self.downloadedUpdate : nil;
|
||||
SUDownloadedUpdate *downloadedUpdate = (error == nil || error.code == SUInstallationAuthorizeLaterError) ? self.downloadedUpdate : nil;
|
||||
[self.basicDriver abortUpdateAndShowNextUpdateImmediately:shouldShowUpdateImmediately downloadedUpdate:downloadedUpdate error:error];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -55,7 +55,7 @@ typedef NS_ENUM(OSStatus, SUError) {
|
||||
SUInstallationError = 4005,
|
||||
SUDowngradeError = 4006,
|
||||
SUInstallationCancelledError = 4007,
|
||||
SUInstallationTryAgainLaterError = 4008
|
||||
SUInstallationAuthorizeLaterError = 4008
|
||||
};
|
||||
|
||||
#endif
|
||||
Vendored
+2
-2
@@ -448,8 +448,8 @@
|
||||
case SUAuthorizationReplyCancelled:
|
||||
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationCancelledError userInfo:nil]);
|
||||
break;
|
||||
case SUAuthorizationReplyTryAgainLater:
|
||||
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationTryAgainLaterError userInfo:nil]);
|
||||
case SUAuthorizationReplyAuthorizeLater:
|
||||
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationAuthorizeLaterError userInfo:nil]);
|
||||
break;
|
||||
case SUAuthorizationReplySuccess:
|
||||
[self setUpConnection];
|
||||
|
||||
Vendored
+1
-1
@@ -223,7 +223,7 @@
|
||||
abortUpdate();
|
||||
});
|
||||
}];
|
||||
} else if (error.code == SUInstallationCancelledError || error.code == SUInstallationTryAgainLaterError) {
|
||||
} else if (error.code == SUInstallationCancelledError || error.code == SUInstallationAuthorizeLaterError) {
|
||||
abortUpdate();
|
||||
} else {
|
||||
[self.userDriver showUpdaterError:nonNullError acknowledgement:^{
|
||||
|
||||
Reference in new issue
Block a user