File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ let enforceMinorUpdates = optionalFeaturesProfile?["enforceMinorUpdates"] as? Bo
24
24
let osVersionRequirementsProfile = getOSVersionRequirementsProfile ( )
25
25
let osVersionRequirementsJSON = getOSVersionRequirementsJSON ( )
26
26
let majorUpgradeAppPath = osVersionRequirementsProfile? . majorUpgradeAppPath ?? osVersionRequirementsJSON? . majorUpgradeAppPath ?? " "
27
- let majorUpgradeAppPathExists = FileManager . default. fileExists ( atPath: majorUpgradeAppPath)
28
- let majorUpgradeBackupAppPathExists = FileManager . default. fileExists ( atPath: Utils ( ) . getBackupMajorUpgradeAppPath ( ) )
27
+ var majorUpgradeAppPathExists = FileManager . default. fileExists ( atPath: majorUpgradeAppPath)
28
+ var majorUpgradeBackupAppPathExists = FileManager . default. fileExists ( atPath: Utils ( ) . getBackupMajorUpgradeAppPath ( ) )
29
29
let requiredInstallationDate = osVersionRequirementsProfile? . requiredInstallationDate ?? osVersionRequirementsJSON? . requiredInstallationDate ?? Date ( timeIntervalSince1970: 0 )
30
30
let requiredMinimumOSVersion = osVersionRequirementsProfile? . requiredMinimumOSVersion ?? osVersionRequirementsJSON? . requiredMinimumOSVersion ?? " 0.0 "
31
31
let requiredMinimumOSVersionNormalized = try ! OSVersion ( requiredMinimumOSVersion) . description
Original file line number Diff line number Diff line change @@ -101,10 +101,12 @@ class SoftwareUpdate {
101
101
if task. terminationStatus != 0 {
102
102
softwareupdateDownloadLog. error ( " Error downloading software updates: \( output, privacy: . public) " )
103
103
} else {
104
- fetchMajorUpgradeSuccessful = true
105
- let msg = " softwareupdate successfully downloaded available update application "
104
+ let msg = " softwareupdate successfully downloaded available update application - updating application paths "
106
105
softwareupdateListLog. notice ( " \( msg, privacy: . public) " )
107
106
softwareupdateDownloadLog. info ( " \( output, privacy: . public) " )
107
+ fetchMajorUpgradeSuccessful = true
108
+ majorUpgradeAppPathExists = FileManager . default. fileExists ( atPath: majorUpgradeAppPath)
109
+ majorUpgradeBackupAppPathExists = FileManager . default. fileExists ( atPath: Utils ( ) . getBackupMajorUpgradeAppPath ( ) )
108
110
}
109
111
} else {
110
112
let msg = " device requires major upgrade but attemptToFetchMajorUpgrade is False - skipping download "
You can’t perform that action at this time.
0 commit comments