From 114b81c9a45bff79ce4cadad7285ffa02afff2d4 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Mon, 26 Dec 2011 20:12:16 -0600 Subject: [PATCH] Use `if` instead of inline `&&` so `rbenv rehash` exits with a zero status --- libexec/rbenv-rehash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libexec/rbenv-rehash b/libexec/rbenv-rehash index 1f4fc91f..5757dcfe 100755 --- a/libexec/rbenv-rehash +++ b/libexec/rbenv-rehash @@ -120,7 +120,9 @@ remove_stale_shims() { local var for shim in *; do var="$(shim_variable_name "$shim")" - [ -z "${!var}" ] && rm -f "$shim" + if [ -z "${!var}" ]; then + rm -f "$shim" + fi done }