Browse Source

feat(asdf): add support for archlinux/AUR package (#9893)

Closes #9893
alexandregv 3 years ago
parent
commit
6babcbd884
1 changed files with 6 additions and 0 deletions
  1. 6 0
      plugins/asdf/asdf.plugin.zsh

+ 6 - 0
plugins/asdf/asdf.plugin.zsh

@@ -2,6 +2,12 @@
 ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
 ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}"
 ASDF_COMPLETIONS="$ASDF_DIR/completions"
 ASDF_COMPLETIONS="$ASDF_DIR/completions"
 
 
+# If not found, check for archlinux/AUR package (/opt/asdf-vm/)
+if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && [[ -f "/opt/asdf-vm/asdf.sh" ]]; then
+  ASDF_DIR="/opt/asdf-vm"
+  ASDF_COMPLETIONS="$ASDF_DIR"
+fi
+
 # 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
   brew_prefix="$(brew --prefix asdf)"
   brew_prefix="$(brew --prefix asdf)"