Skip to content

Commit

Permalink
Update LGAutoPkgRecipe.m
Browse files Browse the repository at this point in the history
Corrected /AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m. If .munki is present, re-add the MakeCatalogs recipe per previous behavior. Renewed disabling of checkbox for the MakeCatalogs.munki recipe. This is no longer available to check to ensure that the entry does not get permanently removed.
  • Loading branch information
shawnhonsberger committed Nov 17, 2020
1 parent 44d835f commit 1e8b623
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions AutoPkgr/Models/AutoPkg Task/LGAutoPkgRecipe.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ - (void)setEnabled:(BOOL)enabled
{
/* We automatically handle the enabling of the MakeCatalogs recipe
* so don't do anything if that's the one getting enabled. */
//if ([self.Name isEqualToString:kLGMakeCatalogsRecipeName]) {
//return;
//}
if ([self.Name isEqualToString:kLGMakeCatalogsRecipeName]) {
return;
}

/* This is all dispatched to a serial queue so a race condition doesn't raise
* when multiple recipes are added or removed in rapid succession. */
Expand Down Expand Up @@ -218,6 +218,7 @@ - (void)setEnabled:(BOOL)enabled
* now listed. If so re-add the MakeCatalogs recipe. */
[currentList enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj rangeOfString:@"munki"].location != NSNotFound) {
[currentList addObject:kLGMakeCatalogsRecipeName];
*stop = YES;
}
}];
Expand Down

0 comments on commit 1e8b623

Please sign in to comment.