aboutsummaryrefslogtreecommitdiff
path: root/rpath.sh
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-15 17:20:07 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-06-15 17:20:07 -0700
commitf8c79996c8d80cc06ec07f3f488e6411f511cb72 (patch)
tree3d773670f744cca890c7e0f6dcfff64789a6c46b /rpath.sh
parentbb67f811b3eeb97de56d7d82165305257098947a (diff)
downloadrbpm-f8c79996c8d80cc06ec07f3f488e6411f511cb72.tar.gz
rbpm-f8c79996c8d80cc06ec07f3f488e6411f511cb72.tar.xz
Fix check for empty array.
Diffstat (limited to 'rpath.sh')
-rwxr-xr-xrpath.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/rpath.sh b/rpath.sh
index ad31310..d37b568 100755
--- a/rpath.sh
+++ b/rpath.sh
@@ -26,7 +26,7 @@ _echo() {
_export() {
echo "export PATH='${PATH//\'/\'\\\'\'}'"
- echo "hash -r"
+ echo 'hash -r'
}
_warn() {
@@ -36,7 +36,7 @@ _warn() {
_die() {
[[ -n "${@}" ]] && _warn "${@}"
- echo "false"
+ echo 'false'
exit 1
}
@@ -65,8 +65,7 @@ _populate_selected() {
fi
done
- [[ -n "${selected}" ]] || return 1
-
+ [[ "${#selected[@]}" -ne 0 ]] || return 1
[[ "${#selected[@]}" -eq 1 ]] \
|| _warn 'warning: multiple rubies found in PATH.'
}