If configured to install Apple Sotware Updates, don't show Major OS Upgrades unless AppleSoftwareUpdatesIncludeMajorOSUpdates preference is True. Match behavior of Munki 6.

This commit is contained in:
Greg Neagle
2026-01-21 17:31:00 -08:00
parent d2adff8cd1
commit e2cc41a7ca
+2 -1
View File
@@ -214,8 +214,9 @@ func getAppleUpdatesList(shouldFilterMajorOSUpdates: Bool = false) -> [PlistDict
/// Gets available Apple updates.
/// Writes a file used by the MSC GUI to display available updates.
/// Returns count of available Apple updates
func findAndRecordAvailableAppleUpdates(shouldFilterMajorOSUpdates: Bool = false) -> Int {
func findAndRecordAvailableAppleUpdates() -> Int {
let appleUpdatesFilePath = managedInstallsDir(subpath: "AppleUpdates.plist")
let shouldFilterMajorOSUpdates = !(boolPref("AppleSoftwareUpdatesIncludeMajorOSUpdates") ?? false)
let appleUpdates = getAppleUpdatesList(
shouldFilterMajorOSUpdates: shouldFilterMajorOSUpdates)
if appleUpdates.isEmpty {