Skip to content

fix(update): refuse to update Homebrew-managed binary#6

Merged
pszymkowiak merged 1 commit intomainfrom
fix/update-brew-detection
Apr 12, 2026
Merged

fix(update): refuse to update Homebrew-managed binary#6
pszymkowiak merged 1 commit intomainfrom
fix/update-brew-detection

Conversation

@pszymkowiak
Copy link
Copy Markdown
Collaborator

Prevents wshm update --apply from breaking Homebrew/apt metadata. Detects /Cellar/ or /homebrew/ in the current exe path and tells user to use brew upgrade wshm instead.

Same pattern as rtk-ai/icm#105.

Detects /Cellar/ or /homebrew/ in current_exe() path and aborts with
a message directing user to 'brew upgrade wshm'. Prevents breaking the
Cellar structure and Homebrew metadata.

Also warns for /usr/bin/ paths which may be managed by apt/dnf/rpm.
Same pattern as rtk-ai/icm#105.
@pszymkowiak pszymkowiak merged commit 60a9237 into main Apr 12, 2026
1 of 4 checks passed
@pszymkowiak
Copy link
Copy Markdown
Collaborator Author

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Adds detection for Homebrew-managed and system package-managed installations in the self-update flow. Refuses to overwrite Homebrew binaries (bailing with a helpful message) and warns when the binary resides in /usr/bin/, suggesting the user upgrade via their package manager instead.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant