# Role: mobile (the Mac - macOS on Apple Silicon) # # Homebrew's shellenv belongs in .zprofile, not here: a non-login shell would # otherwise have no /opt/homebrew/bin in PATH. That is not theory - during the # design phase "ssh mac brew --version" came back empty for exactly that # reason, and was briefly mistaken for Homebrew not being installed. # Apple Silicon puts Homebrew under /opt/homebrew; Intel Macs use /usr/local. # Checked rather than assumed, so the same file works on either. for _b in /opt/homebrew /usr/local; do if [[ -x "$_b/bin/brew" ]]; then eval "$("$_b/bin/brew" shellenv)" break fi done unset _b