From f80d06325c654bb1c5d30a7e762957d71c65fc85 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 8 Nov 2025 08:19:02 -0800 Subject: [PATCH] Enforce RunAtLoad and remove KeepAlive (#2795) Overriding KeepAlive before actually implies RunAtLoad is true but we were setting RunAtLoad to false which is conflicting. In any case we don't want to restart the job if it crashes, and we want to run Updater when the job is loaded. --- InstallerLauncher/SUInstallerLauncher.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index 044d1167..02cdf972 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -86,8 +86,7 @@ jobDictionary[@"Label"] = label; jobDictionary[@"ProgramArguments"] = arguments; jobDictionary[@"EnableTransactions"] = @NO; - jobDictionary[@"KeepAlive"] = @{@"SuccessfulExit" : @NO}; - jobDictionary[@"RunAtLoad"] = @NO; + jobDictionary[@"RunAtLoad"] = @YES; jobDictionary[@"Nice"] = @0; jobDictionary[@"ProcessType"] = @"Interactive"; jobDictionary[@"LaunchOnlyOnce"] = @YES; @@ -284,7 +283,7 @@ } } - NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"KeepAlive" : @{@"SuccessfulExit" : @NO}, @"RunAtLoad" : @NO, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}}; + NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"RunAtLoad" : @YES, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}}; CFErrorRef submitError = NULL; #pragma clang diagnostic push