Repository navigation
Conversation
The update button for an app matched to a Homebrew cask only opened the app. When Homebrew already manages the cask (its folder exists in the Caskroom), the button now runs 'brew upgrade --cask --greedy <token>' as a regular update operation, with the usual progress state and error reporting. --greedy includes casks that update themselves, which Latest already lists. Apps that were not installed through Homebrew, or when brew is missing, keep opening the app as before; nothing is installed over an existing app. The cask token is validated before it reaches brew. Addresses mangerlahn#288. The command is not covered by an automated test that runs brew; the tests cover detecting managed casks and validating tokens and arguments. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
👍 Built this locally on macOS 27 and it works well for me. Homebrew apps that used to just open now update right inside Latest. I also tested it merged with moreaki's auto-refresh branch ( Thanks for the work on this. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #288.
When Homebrew already manages an app's cask (its folder exists in the Caskroom), the update button now runs
brew upgrade --cask --greedy <token>as a normal update operation with progress and errors. Apps that were not installed through Homebrew keep opening the app as before, so nothing is ever installed over an existing app. The cask token is validated before it reaches brew, and brew is located in the Apple silicon or Intel default prefix. The token is passed fromUpdateRepositoryto the checker.Source.supportStatefor.homebrewstays.limited, since not every Homebrew-matched app can be updated this way. That is a decision for the maintainer.Tests cover detecting managed casks (a temporary Caskroom), token validation and the exact arguments. The operation itself has been exercised for real on my machine with several casks (
brew upgrade --cask --greedyfor a managed cask finishes and the app list refreshes), but there is no automated test that runs brew.Written with Claude's help. The only failure in the suite is
VersionParserTest.testEmptyVersionParsing, which already fails onmain.🤖 Generated with Claude Code