We can do guided installation silently if we're root

This commit is contained in:
Zorg committed 2016-06-03 23:16:21 -04:00
1 parent 070686b488
commit 623f535883
1 file changed
+1 -2
+1 -2
View File
@@ -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"}];
}