scripts/hook in rvm-1.0.2 vs scripts/hook in rvm-1.0.3
- old
+ new
@@ -1,10 +1,14 @@
#!/usr/bin/env bash
-if [[ ! -z "$rvm_hook" ]] ; then
+declare rvm_verbose_flag=${rvm_verbose_flag:-0}
+declare rvm_hook=${rvm_hook:-""}
+
+if [[ -n "$rvm_hook" ]] ; then
if [[ -s "$rvm_hooks_path/$rvm_hook" ]] ; then
- if [[ "$rvm_verbose_flag" -eq 1 ]] || [[ "$rvm_debug_flag" -eq 1 ]] ; then
+ if [[ $rvm_verbose_flag -eq 1 ]] || [[ "$rvm_debug_flag" -eq 1 ]] ; then
"$rvm_scripts_path/log" "info" "running hook $rvm_hook"
fi
source "$rvm_hooks_path/$rvm_hook"
fi
-fi ; unset rvm_hook
+fi
+unset rvm_hook