fix: Upgrade All must pass --greedy when greedy listing is on
--greedy exists on both brew commands: outdated --greedy lists self-updating casks, upgrade --greedy actually upgrades them (plain upgrade skips them, per brew's own help). The listing and auto-upgrade paths had the flag but manual Upgrade All didn't, so greedy-listed casks would survive Upgrade All and reappear as outdated forever. Single-package upgrades don't need it: brew upgrades an explicitly named cask even when it self-updates. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
0bc18b79b8
commit
741f9572b7
|
|
@ -216,8 +216,12 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
|
|
||||||
statusMenuItem.title = "Upgrading..."
|
statusMenuItem.title = "Upgrading..."
|
||||||
|
|
||||||
|
// must match the outdated listing: greedy-listed casks are skipped by
|
||||||
|
// plain "upgrade" and would stay outdated forever
|
||||||
|
let command = Settings.includeGreedyCasks ? "upgrade --greedy" : "upgrade"
|
||||||
|
|
||||||
runBrew("update") { _ in
|
runBrew("update") { _ in
|
||||||
self.runBrew("upgrade") { _ in
|
self.runBrew(command) { _ in
|
||||||
// everything was just upgraded; don't chain an auto-upgrade
|
// everything was just upgraded; don't chain an auto-upgrade
|
||||||
self.fetchOutdated(allowAutoUpgrade: false)
|
self.fetchOutdated(allowAutoUpgrade: false)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue