Skip to content

Commit fc9f779

Browse files
author
Daniel Nolan
authored
Add eval command for homebrew to zshenv (#707)
* I recently setup my M1 mac and had a similar problem to this issue reported here #702 The fix for me was to do what homebrew says after the install which is to add to or create a .zprofile with the following command `eval "$(/opt/homebrew/bin/brew shellenv)"` * Introduce a zprofile with commands to eval homebrew on mac or linux if the homebrew directory exists
1 parent dc847d2 commit fc9f779

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

zprofile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
if [ -d "/opt/homebrew" ]; then
2+
eval "$(/opt/homebrew/bin/brew shellenv)"
3+
elif [ -d "~/.linuxbrew" ]; then
4+
eval "$(~/.linuxbrew/bin/brew shellenv)"
5+
elif [ -d "/home/linuxbrew" ]; then
6+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
7+
fi

0 commit comments

Comments
 (0)