Skip to content
Snippets Groups Projects
Unverified Commit f3dc125d authored by Zorg's avatar Zorg Committed by GitHub
Browse files

Skip preflight update check in sparkle-cli if user is root (#2645)

parent 544c6424
Branches
Tags
No related merge requests found
......@@ -139,7 +139,17 @@ typedef NS_ENUM(int, CLIErrorExitStatus) {
switch (updateCheck) {
case SPUUpdateCheckUpdates:
case SPUUpdateCheckUpdatesInBackground:
if (_interactive || !SPUSystemNeedsAuthorizationAccessForBundlePath(_updater.hostBundle.bundlePath)) {
{
if (_interactive) {
return YES;
}
BOOL rootUser = (geteuid() == 0);
if (rootUser) {
return YES;
}
if (!SPUSystemNeedsAuthorizationAccessForBundlePath(_updater.hostBundle.bundlePath)) {
return YES;
}
......@@ -148,6 +158,7 @@ typedef NS_ENUM(int, CLIErrorExitStatus) {
}
return NO;
}
case SPUUpdateCheckUpdateInformation:
return YES;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment