1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

fix(asdf): fix path to Homebrew installation of asdf (#10481)

Fixes #10484
Closes #10481
This commit is contained in:
Sergei Shishov 2021-12-05 11:48:00 +04:00 committed by Marc Cornellà
parent 8ae373130c
commit bd0b4b64c6
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -4,16 +4,18 @@ ASDF_COMPLETIONS="$ASDF_DIR/completions"
# If not found, check for Homebrew package # If not found, check for Homebrew package
if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then
ASDF_DIR="$(brew --prefix asdf)" brew_prefix="$(brew --prefix asdf)"
ASDF_COMPLETIONS="$ASDF_DIR/etc/bash_completion.d" ASDF_DIR="${brew_prefix}/libexec"
ASDF_COMPLETIONS="${brew_prefix}/etc/bash_completion.d"
unset brew_prefix
fi fi
# Load command # Load command
if [[ -f "$ASDF_DIR/asdf.sh" ]]; then if [[ -f "$ASDF_DIR/asdf.sh" ]]; then
. "$ASDF_DIR/asdf.sh" . "$ASDF_DIR/asdf.sh"
# Load completions # Load completions
if [[ -f "$ASDF_COMPLETIONS/asdf.bash" ]]; then if [[ -f "$ASDF_COMPLETIONS/asdf.bash" ]]; then
. "$ASDF_COMPLETIONS/asdf.bash" . "$ASDF_COMPLETIONS/asdf.bash"
fi fi
fi fi