Created
April 20, 2023 18:50
-
-
Save cruinh/97f29c12524b84fe62eab146ec0d7a70 to your computer and use it in GitHub Desktop.
.zshrc script for auto-selecting homebrew path based on system architecture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The i386 version of homebrew installs to "/usr/local/bin" | |
# The arm64 version of homebew installs to "/opt/homebrew" | |
# By default, "/usr/local/bin" is the very first entry in PATH on macs (see "man path_helper" and "/etc/paths") | |
# Therefore, when not using Rosetta 2, prepend "/opt/homebrew" to PATH to ensure the arm64 version of homebrew is used | |
if [ "arm64" = `arch` ]; then | |
export PATH="/opt/homebrew/bin:$PATH" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment