浏览代码

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

Closes #9893
alexandregv 3 年之前
父节点
当前提交
6babcbd884
共有 1 个文件被更改,包括 6 次插入0 次删除
  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_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 [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then
   brew_prefix="$(brew --prefix asdf)"