Skip to content

Commit f80d063

Browse files
authored
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.
1 parent 0843eee commit f80d063

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

InstallerLauncher/SUInstallerLauncher.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ - (BOOL)submitProgressToolAtPath:(NSString *)progressToolPath withHostBundle:(NS
8686
jobDictionary[@"Label"] = label;
8787
jobDictionary[@"ProgramArguments"] = arguments;
8888
jobDictionary[@"EnableTransactions"] = @NO;
89-
jobDictionary[@"KeepAlive"] = @{@"SuccessfulExit" : @NO};
90-
jobDictionary[@"RunAtLoad"] = @NO;
89+
jobDictionary[@"RunAtLoad"] = @YES;
9190
jobDictionary[@"Nice"] = @0;
9291
jobDictionary[@"ProcessType"] = @"Interactive";
9392
jobDictionary[@"LaunchOnlyOnce"] = @YES;
@@ -284,7 +283,7 @@ - (SUInstallerLauncherStatus)submitInstallerAtPath:(NSString *)installerPath wit
284283
}
285284
}
286285

287-
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}};
286+
NSDictionary *jobDictionary = @{@"Label" : label, @"ProgramArguments" : arguments, @"EnableTransactions" : @NO, @"RunAtLoad" : @YES, @"Nice" : @0, @"ProcessType": @"Interactive", @"LaunchOnlyOnce": @YES, @"MachServices" : @{SPUInstallerServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES, SPUProgressAgentServiceNameForBundleIdentifier(hostBundleIdentifier) : @YES}};
288287

289288
CFErrorRef submitError = NULL;
290289
#pragma clang diagnostic push

0 commit comments

Comments
 (0)