diff --git a/bin/private/asdf-exec b/bin/private/asdf-exec index 5181e842..2c46d6ba 100755 --- a/bin/private/asdf-exec +++ b/bin/private/asdf-exec @@ -20,7 +20,7 @@ IFS=' ' read -a versions <<< "$full_version" for version in "${versions[@]}"; do install_path=$(find_install_path $plugin_name $version) - if [ $version != "system" -a ! -d "$install_path" ]; then + if [ $version != "system" ] && [ ! -d "$install_path" ]; then echo "$plugin_name $version not installed" exit 1 fi diff --git a/lib/utils.sh b/lib/utils.sh index ffe23586..4e5de7a0 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -59,7 +59,7 @@ check_if_plugin_exists() { check_if_version_exists() { local plugin_name=$1 local version=$2 - local version_dir=$(asdf_dir)/installs/$plugin/$version + local version_dir=$(asdf_dir)/installs/$plugin_name/$version # if version starts with path: use that directory if [ "${version/path:}" != "$version" ]; then @@ -68,7 +68,7 @@ check_if_version_exists() { check_if_plugin_exists $plugin_name - if [ $version != "system" -a ! -d $version_dir ]; then + if [ $version != "system" ] && [ ! -d $version_dir ]; then display_error "version $version is not installed for $plugin_name" exit 1 fi