Skip to content

Detect Homebrew location for Intel support#782

Merged
purinkle merged 1 commit intomainfrom
fix-homebrew-path-detection
Apr 8, 2026
Merged

Detect Homebrew location for Intel support#782
purinkle merged 1 commit intomainfrom
fix-homebrew-path-detection

Conversation

@purinkle
Copy link
Copy Markdown
Contributor

@purinkle purinkle commented Apr 1, 2026

Summary

  • Fixes the hardcoded /opt/homebrew/bin/brew path that only works on Apple Silicon Macs
  • Checks for Homebrew at /opt/homebrew/bin/brew (Apple Silicon) and /usr/local/bin/brew (Intel) before eval-ing shellenv

Closes #781

The hardcoded `/opt/homebrew/bin/brew` path only works on
Apple Silicon Macs. Intel Macs install Homebrew to
`/usr/local/bin/brew`. Check both paths before eval-ing
shellenv.

Closes #781
Copy link
Copy Markdown

@MatheusRich MatheusRich left a comment

Choose a reason for hiding this comment

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

LGTM. To confirm, are our dotfiles MacOs-only?

@purinkle
Copy link
Copy Markdown
Contributor Author

purinkle commented Apr 2, 2026

@MatheusRich, not macOS-only, but macOS is the only supported platform. dotfiles is a companion to laptop, which targets macOS on Apple Silicon and Intel. Someone raised the same question recently in #778. Linux users do use it, but we don't support that.

The if guard here means the line is a no-op on systems without homebrew rather than an error. That is a small improvement for those users, too.

@purinkle purinkle merged commit 317ba3a into main Apr 8, 2026
@purinkle purinkle deleted the fix-homebrew-path-detection branch April 8, 2026 19:00
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.

zshrc expecting wrong homebrew location

2 participants