Skip to content

Commit 322bc55

Browse files
committed
remove unsafe check for big sur 11.3 and lower
Since we are no longer using `softwareupdate --download --all` this bug may no longer be triggering. This needs to be tested but I think it will work.
1 parent 6d25eb9 commit 322bc55

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

Nudge/UI/Main.swift

+6-12
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
6363
if Utils().demoModeEnabled() {
6464
return
6565
}
66-
if Utils().unsafeSoftwareUpdate() {
67-
// Temporary workaround for Big Sur bug
68-
let msg = "Due to a bug in Big Sur 11.3 and lower, Nudge cannot reliably use /usr/sbin/softwareupdate to download updates. See https://openradar.appspot.com/radar?id=4987491098558464 for more information regarding this issue."
69-
softwareupdateDownloadLog.warning("\(msg, privacy: .public)")
70-
return
71-
} else {
72-
if asyncronousSoftwareUpdate && Utils().requireMajorUpgrade() == false {
73-
DispatchQueue(label: "nudge-su", attributes: .concurrent).asyncAfter(deadline: .now(), execute: {
74-
SoftwareUpdate().Download()
75-
})
76-
} else {
66+
67+
if asyncronousSoftwareUpdate && Utils().requireMajorUpgrade() == false {
68+
DispatchQueue(label: "nudge-su", attributes: .concurrent).asyncAfter(deadline: .now(), execute: {
7769
SoftwareUpdate().Download()
78-
}
70+
})
71+
} else {
72+
SoftwareUpdate().Download()
7973
}
8074
}
8175

Nudge/Utilities/Utils.swift

-9
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,6 @@ struct Utils {
473473
return simpleModeEnabled
474474
}
475475

476-
func unsafeSoftwareUpdate() -> Bool {
477-
let runningUnsafeSoftwareUpdateOSVersion = versionLessThan(currentVersion: currentOSVersion, newVersion: "11.4")
478-
if runningUnsafeSoftwareUpdateOSVersion {
479-
return true
480-
} else {
481-
return false
482-
}
483-
}
484-
485476
func updateDevice(userClicked: Bool = true) {
486477
if userClicked {
487478
let msg = "User clicked updateDevice"

0 commit comments

Comments
 (0)