# Homebrew on macOS. .zshenv runs for every zsh (interactive, scripts, GUI-launched), # and brew shellenv needs a readable CWD: cd to a safe dir first so launching from a # TCC-protected directory (e.g. ~/Documents) does not break the eval or prompt for access. if [ -x /opt/homebrew/bin/brew ]; then eval "$(cd /tmp && /opt/homebrew/bin/brew shellenv)" elif [ -x /usr/local/bin/brew ]; then eval "$(cd /tmp && /usr/local/bin/brew shellenv)" fi