fix(auto-updates): replace nonexistent brew autoupdate with LaunchAgent#58
Merged
smartwatermelon merged 2 commits intomainfrom Feb 12, 2026
Merged
Conversation
`brew autoupdate` is not a built-in Homebrew command — it requires the third-party DomT4/homebrew-autoupdate tap. Replace with a native LaunchAgent + wrapper script that runs `brew update && brew upgrade && brew cleanup` daily at 04:30. Also fix all three sections to actually load their LaunchAgent/Daemon after creation instead of just logging a hint. The idempotency check now ensures the agent is loaded even on re-runs. The wrapper script handles Apple Silicon Homebrew environment setup (eval brew shellenv) which is required for LaunchAgent context where PATH doesn't include /opt/homebrew/bin by default. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Some cask upgrades invoke sudo for .pkg installers. In a LaunchAgent context with no TTY, sudo blocks forever. Fix: - Set SUDO_ASKPASS=/bin/false so sudo fails immediately - Split upgrade into --formula then --cask so a cask needing sudo doesn't block formula upgrades - Set HOMEBREW_NO_AUTO_UPDATE=1 since we run brew update explicitly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
Author
|
Seer finding addressed: The hardcoded |
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.
Summary
brew autoupdate(requires third-partyDomT4/homebrew-autoupdatetap) with a native LaunchAgent that runsbrew update && brew upgrade && brew cleanupdaily at 04:30Details
brew autoupdateis not a built-in Homebrew subcommand. The original implementation assumed it was, with a fallback tobrew tap domt4/autoupdate. Neither path works without installing the third-party tap first.The fix creates a simple wrapper script + LaunchAgent (same pattern as the existing MAS section), handling Apple Silicon Homebrew environment setup (
eval brew shellenv).Test plan
scp scripts/server/setup-auto-updates.sh andrewrich@tilsit.local:/tmp/server-setup/scripts/./scripts/setup-auto-updates.sh --forcelaunchctl list | grep brew-upgradelaunchctl list | grep massudo launchctl list | grep softwareupdate🤖 Generated with Claude Code