mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Correct if statements in asdf-exec and utils.sh.
This commit is contained in:
parent
5899d47d75
commit
0f7757a910
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user