Skip to content

Commit

Permalink
fix version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jul 25, 2024
1 parent 3d618e9 commit 2f39c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
LogManager.notice("minorVersionRecalculationThreshold is set to \(OSVersionRequirementVariables.minorVersionRecalculationThreshold) - Current Version: \(currentInstalledVersion) - Targeting version \(targetVersion) requiredInstallationDate via SOFA", logger: sofaLog)
for osVersion in macOSSOFAAssets {
for securityRelease in osVersion.securityReleases.reversed() {
if VersionManager.versionGreaterThanOrEqual(currentVersion: securityRelease.productVersion, newVersion: targetVersion) && VersionManager.versionLessThan(currentVersion: currentInstalledVersion, newVersion: targetVersion) {
if VersionManager.versionGreaterThanOrEqual(currentVersion: securityRelease.productVersion, newVersion: targetVersion) && VersionManager.versionLessThanOrEqual(currentVersion: currentInstalledVersion, newVersion: targetVersion) {
requiredInstallationDate = securityRelease.releaseDate?.addingTimeInterval(slaExtension) ?? DateManager().getCurrentDate().addingTimeInterval(TimeInterval(90 * 86400))
LogManager.notice("Found target macOS version \(targetVersion) - releaseDate is \(securityRelease.releaseDate!), slaExtension is \(LoggerUtilities().printTimeInterval(slaExtension))", logger: sofaLog)
foundVersion = true
Expand Down

0 comments on commit 2f39c0c

Please sign in to comment.