Correct if statements in asdf-exec and utils.sh.

This commit is contained in:
Trevor Brown 2017-03-25 14:50:30 -04:00
parent 5899d47d75
commit 0f7757a910
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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