Assume people don't change their Homebrew dir
It checks the home directory location and the default Homebrew location before falling back to `brew --prefix` (Sloooow!) This also accounts for non macOS systems that don't have Homebrew.
This commit is contained in:
parent
2af1b50124
commit
cdd0d2ced8
1 changed files with 5 additions and 3 deletions
|
@ -3,9 +3,11 @@ PATH="$HOME/.bin:/usr/local/sbin:$PATH"
|
|||
|
||||
# load ASDF, either from home dir or brew install
|
||||
if [ -f "$HOME/.asdf/asdf.sh" ]; then
|
||||
. $HOME/.asdf/asdf.sh
|
||||
elif ASDF_PREFIX=$(brew --prefix asdf); then
|
||||
. $ASDF_PREFIX/asdf.sh
|
||||
. "$HOME/.asdf/asdf.sh"
|
||||
elif [ -f "/usr/local/opt/asdf/asdf.sh" ]; then
|
||||
. "/usr/local/opt/asdf/asdf.sh"
|
||||
elif which brew >/dev/null && ASDF_PREFIX=$(brew --prefix asdf); then
|
||||
. "$ASDF_PREFIX/asdf.sh"
|
||||
fi
|
||||
|
||||
# mkdir .git/safe in the root of repositories you trust
|
||||
|
|
Loading…
Add table
Reference in a new issue