From 317ba3a479e4b104328150070b71e1a89d5bd532 Mon Sep 17 00:00:00 2001 From: Rob Whittaker Date: Wed, 1 Apr 2026 15:32:52 +0100 Subject: [PATCH] Detect Homebrew location for Intel support 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 --- zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index b28b88ffd3..4cf952da72 100644 --- a/zshrc +++ b/zshrc @@ -34,7 +34,11 @@ _load_settings() { } _load_settings "$HOME/.zsh/configs" -eval "$(/opt/homebrew/bin/brew shellenv)" +if [ -x /opt/homebrew/bin/brew ]; then + eval "$(/opt/homebrew/bin/brew shellenv)" +elif [ -x /usr/local/bin/brew ]; then + eval "$(/usr/local/bin/brew shellenv)" +fi export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"