diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-06-15 17:20:07 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-06-15 17:20:07 -0700 |
commit | f8c79996c8d80cc06ec07f3f488e6411f511cb72 (patch) | |
tree | 3d773670f744cca890c7e0f6dcfff64789a6c46b | |
parent | bb67f811b3eeb97de56d7d82165305257098947a (diff) | |
download | rbpm-f8c79996c8d80cc06ec07f3f488e6411f511cb72.tar.gz rbpm-f8c79996c8d80cc06ec07f3f488e6411f511cb72.tar.xz |
Fix check for empty array.
-rwxr-xr-x | rpath.sh | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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.' } |