Skip to content

Commit

Permalink
Bash, Zsh: Only set Brew environment variables on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
ebouchut committed Apr 10, 2022
1 parent 2cb438c commit 373ddd5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
18 changes: 10 additions & 8 deletions tag-bash/bash_profile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
case "$(uname -m)" in
x86_64)
eval "$(/usr/local/bin/brew shellenv)"
;;
arm64)
eval "$(/opt/homebrew/bin/brew shellenv)"
;;
esac
if [[ "$OSTYPE" == "darwin"* ]] ; then
case "$(uname -m)" in
x86_64)
eval "$(/usr/local/bin/brew shellenv)"
;;
arm64)
eval "$(/opt/homebrew/bin/brew shellenv)"
;;
esac
fi

if [ -f ~/.bashrc ];
then
Expand Down
18 changes: 10 additions & 8 deletions tag-zsh/zprofile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
case "$(uname -m)" in
x86_64)
eval "$(/usr/local/bin/brew shellenv)"
;;
arm64)
eval "$(/opt/homebrew/bin/brew shellenv)"
;;
esac
if [[ "$OSTYPE" == "darwin"* ]] ; then
case "$(uname -m)" in
x86_64)
eval "$(/usr/local/bin/brew shellenv)"
;;
arm64)
eval "$(/opt/homebrew/bin/brew shellenv)"
;;
esac
fi

0 comments on commit 373ddd5

Please sign in to comment.