From f8c79996c8d80cc06ec07f3f488e6411f511cb72 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 15 Jun 2014 17:20:07 -0700 Subject: Fix check for empty array. --- rpath.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rpath.sh') 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.' } -- cgit v1.2.3-70-g09d2