Skip to content

Conversation

@andrinoff
Copy link
Member

This pull request improves the Homebrew upgrade process in the runUpdateCLI function by ensuring that Homebrew taps are updated before attempting to upgrade the matcha package. If updating the taps fails, the process will still attempt the upgrade and print a warning.

Homebrew upgrade process improvements:

  • The CLI now runs brew update before brew upgrade matcha, and prints a warning if the update fails but continues to attempt the upgrade.

Copilot AI review requested due to automatic review settings January 2, 2026 19:26
@andrinoff andrinoff merged commit 549c5df into floatpane:master Jan 2, 2026
3 checks passed
@andrinoff andrinoff deleted the fix/update-brew branch January 2, 2026 19:27
Copy link

Copilot AI left a 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 pull request improves the Homebrew upgrade workflow by adding a brew update step before attempting to upgrade the matcha package. This ensures that Homebrew's formula index is current before the upgrade attempt.

Key Changes:

  • Added brew update execution before brew upgrade matcha with graceful error handling
  • Updated user-facing message to reflect the additional update step
  • Renamed the cmd variable to upgradeCmd for better clarity
Comments suppressed due to low confidence (2)

main.go:1456

  • File handle may be writable as a result of data flow from a call to OpenFile and closing it may result in data loss upon failure, which is not handled explicitly.
		out.Close()

main.go:1460

  • File handle may be writable as a result of data flow from a call to OpenFile and closing it may result in data loss upon failure, which is not handled explicitly.
	out.Close()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err == nil {
fmt.Println("Detected Homebrew — updating taps and attempting to upgrade via brew.")
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message refers to "updating taps" but brew update updates more than just taps - it also updates Homebrew itself and all formula/cask definitions. Consider changing this to "Detected Homebrew — updating Homebrew and attempting to upgrade via brew." for accuracy.

Suggested change
fmt.Println("Detected Homebrew — updating taps and attempting to upgrade via brew.")
fmt.Println("Detected Homebrew — updating Homebrew and attempting to upgrade via brew.")

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant