Use the location of brew
to determine where asdf
is
This commit is contained in:
parent
dbbae5752b
commit
52ee922459
1 changed files with 3 additions and 7 deletions
|
@ -4,14 +4,10 @@ PATH="$HOME/.bin:/usr/local/sbin:$PATH"
|
||||||
# Try loading ASDF from the regular home dir location
|
# Try loading ASDF from the regular home dir location
|
||||||
if [ -f "$HOME/.asdf/asdf.sh" ]; then
|
if [ -f "$HOME/.asdf/asdf.sh" ]; then
|
||||||
. "$HOME/.asdf/asdf.sh"
|
. "$HOME/.asdf/asdf.sh"
|
||||||
# It's not in the home dir, let's try the default Homebrew location
|
|
||||||
elif [ -f "/usr/local/opt/asdf/asdf.sh" ]; then
|
|
||||||
. "/usr/local/opt/asdf/asdf.sh"
|
|
||||||
# Not there either! Last try, let's see if Homebrew can tell us where it is
|
|
||||||
elif which brew >/dev/null &&
|
elif which brew >/dev/null &&
|
||||||
ASDF_PREFIX=$(brew --prefix asdf) &&
|
BREW_DIR=$(which brew | sed 's/\/bin\/brew//') &&
|
||||||
[ -f "$ASDF_PREFIX/asdf.sh" ]; then
|
[ -f "$BREW_DIR/opt/asdf/asdf.sh" ]; then
|
||||||
. "$ASDF_PREFIX/asdf.sh"
|
. "$BREW_DIR/opt/asdf/asdf.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mkdir .git/safe in the root of repositories you trust
|
# mkdir .git/safe in the root of repositories you trust
|
||||||
|
|
Loading…
Add table
Reference in a new issue