scripts/hook in rvm-0.1.31 vs scripts/hook in rvm-0.1.32
- old
+ new
@@ -1,12 +1,8 @@
#!/usr/bin/env bash
-if [[ ! -z "$rvm_trace_flag" ]] ; then set -x ; export rvm_trace_flag ; fi
-
-trap "if [[ -d $rvm_tmp_path/ ]] && [[ -f $rvm_tmp_path/$$ ]] ; then rm -f $rvm_tmp_path/$$ > /dev/null 2>&1 ; fi ; exit" 0 1 2 3 15
-
-if [[ ! -z "$1" ]] ; then
- if [[ -s "$rvm_hooks_path/$1" ]] ; then
- if [[ "$rvm_verbose_flag" -eq 1 ]] || [[ "$rvm_debug_flag" -eq 1 ]] ; then $rvm_scripts_path/log "info" "running hook $1" ; fi
- source "$rvm_hooks_path/$1"
+if [[ ! -z "$rvm_hook" ]] ; then
+ if [[ -s "$rvm_hooks_path/$rvm_hook" ]] ; 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
+fi ; unset rvm_hook