Use if instead of inline && so rbenv rehash exits with a zero status

This commit is contained in:
Sam Stephenson 2011-12-26 20:12:16 -06:00
parent b10bdb1e78
commit 114b81c9a4

View file

@ -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
}