Fix sourcing of asdf.sh (#710)

Installing asdf via Homebrew now requires souring from a different path.

This same issue was recently fixed in thoughbot/laptop by @cpytel, and so I've copied the changes from this commit:
aa3a84e15e
This commit is contained in:
Abhineet 2022-12-13 20:03:10 +05:30 committed by GitHub
parent 69b8ce1e84
commit fc2624997b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,9 +5,7 @@ PATH="$HOME/.bin:/usr/local/sbin:$PATH"
if [ -f "$HOME/.asdf/asdf.sh" ]; then
. "$HOME/.asdf/asdf.sh"
elif which brew >/dev/null &&
BREW_DIR="$(dirname `which brew`)/.." &&
[ -f "$BREW_DIR/opt/asdf/asdf.sh" ]; then
. "$BREW_DIR/opt/asdf/asdf.sh"
. "$(brew --prefix asdf)/libexec/asdf.sh"
fi
# mkdir .git/safe in the root of repositories you trust