-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/idempotent cask installation #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add install_cask_if_missing() helper function to check if apps are already installed - Update all cask installations to skip if already installed via Homebrew or in /Applications - Make script fully idempotent - safe to run multiple times - Add setup-mac4dev-skip-installed.sh variant that skips Homebrew, core tools, and IDEs
- Remove the skip-installed variant script as it's no longer needed - Main script now handles idempotent installation checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the macOS setup script to be fully idempotent by adding a helper function that checks for existing installations before attempting to install Homebrew casks. The changes ensure the script can be safely run multiple times without reinstalling already-present applications.
Changes:
- Added
install_cask_if_missing()helper function to check Homebrew and /Applications before installing - Replaced all direct
brew install --caskcommands with calls to the new helper function - Fixed duplicate
disabledfield in Starship time configuration - Removed redundant iTerm2 installation check code (now handled by helper function)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
telekosmos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as a common rule, given this one was entirely done by Cursor, I rely on the patch
Fix: Make cask installation idempotent
Description
This PR improves the setup script to be fully idempotent and removes redundant code.
install_cask_if_missing()helper function to check if applications are already installed via Homebrew or in/Applicationssetup-mac4dev-skip-installed.shvariant script as it's no longer neededType of Change
Checklist