From d7ceb38b060d1dcf41cf9537da5d20e9c4e7a451 Mon Sep 17 00:00:00 2001 From: Henrik Nyh Date: Sat, 8 Apr 2017 09:37:47 +0100 Subject: [PATCH] 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 --- lib/utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.sh b/lib/utils.sh index c2e2d608..d6299822 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -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