Avoid bash error when no version is set

Running "asdf current ruby" before installing any Rubies gave me:

    /Users/henrik/.asdf/lib/utils.sh: line 73: [: !=: unary operator expected
    No version set for ruby
This commit is contained in:
Henrik Nyh 2017-04-08 09:37:47 +01:00
parent 75eb1fbf3a
commit d7ceb38b06

View File

@ -68,7 +68,7 @@ check_if_version_exists() {
check_if_plugin_exists $plugin_name
if [ $version != "system" ] && [ ! -d $version_dir ]; then
if [ "$version" != "system" ] && [ ! -d $version_dir ]; then
display_error "version $version is not installed for $plugin_name"
exit 1
fi