aboutsummaryrefslogtreecommitdiff
path: root/rpath.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rpath.sh')
-rwxr-xr-xrpath.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/rpath.sh b/rpath.sh
index 7ba2d90..3f05790 100755
--- a/rpath.sh
+++ b/rpath.sh
@@ -120,15 +120,15 @@ rpath_set() {
for dir in "${dirs[@]}"; do
if [[ "${dir##*/}" == *"${1}"* ]]; then
- _clear
- _add "${dir}"
- _export
-
- return
+ match="${dir}"
fi
done
- _die 'no matching ruby found.'
+ [[ -n "${match}" ]] || _die 'no matching ruby found.'
+
+ _clear
+ _add "${match}"
+ _export
}
rpath_clear() {