mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
We can do guided installation silently if we're root
This commit is contained in:
1 parent
070686b488
commit
623f535883
1 file changed
+1
-2
Vendored
+1
-2
@@ -45,7 +45,7 @@
|
||||
|
||||
- (BOOL)performSecondStageAllowingAuthorization:(BOOL)allowsAuthorization withEnvironment:(SUAuthorizationEnvironment * _Nullable)authorizationEnvironment allowingUI:(BOOL)allowsUI error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
if (!allowsUI) {
|
||||
if (!allowsUI && ![self canInstallSilently]) {
|
||||
if (error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{NSLocalizedDescriptionKey : @"Guided installer cannot continue if showing UI is not allowed"}];
|
||||
}
|
||||
@@ -80,7 +80,6 @@
|
||||
};
|
||||
|
||||
validInstallation = [self.fileManager authorizeAndExecuteWithPrivilegesAtPath:installerPath arguments:arguments];
|
||||
|
||||
if (!validInstallation && error != NULL) {
|
||||
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{NSLocalizedDescriptionKey : @"Failed to authorize installer"}];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user