scripts/utility in rvm-1.1.0 vs scripts/utility in rvm-1.1.1
- old
+ new
@@ -267,29 +267,25 @@
if [[ ! -d "${log%\/*}" ]] ; then
\mkdir -p "${log%\/*}"
fi
- \touch "$log" "${log/%.log/.error.log}" # for zsh :(
+ \touch "$log" # for zsh :(
- printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command\n" | \
- \tee "$log" \
- >> "${log/%log/error.log}"
+ printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command\n" > "$log"
if [[ ${rvm_niceness:-0} -gt 0 ]] ; then
command="nice -n $rvm_niceness $command"
fi
- eval "$command" \
- >> "$log" \
- 2>> "${log/%log/error.log}"
+ eval "$command" >> "$log" 2>&1
result=$?
if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
- "Error running '$command', please check ${log/%log/error.log}"
+ "Error running '$command', please read $log"
fi
return ${result:-0}
}
@@ -322,36 +318,31 @@
if [[ ! -d "$path" ]] ; then
\mkdir -p "$path"
fi
- \touch "$log" "${log/%.log/.error.log}" # for zsh :(
+ \touch "$log" # for zsh :(
- printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command # under $environment\n" \
- | tee "${log}" \
- >> "${log/%log/error.log}"
+ printf "[$(date +'%Y-%m-%d %H:%M:%S')] $command # under $environment\n" > "${log}"
if [[ ${rvm_niceness:-0} -gt 0 ]] ; then
command="nice -n $rvm_niceness $command"
fi
(
rvm_ruby_string="$environment"
__rvm_use
- eval "$command" \
- >> "${log}" \
- 2>> "${log/%log/error.log}"
+ eval "$command" >> "${log}" 2>&1
)
result=$?
if [[ $result -gt 0 ]] ; then
"$rvm_path/scripts/log" "error" \
- "Error running '$command' under $env_name,\
- \nplease check ${log/%log/error.log}"
+ "Error running '$command' under $env_name,\nplease read $log"
fi
return ${result:-0}
}
@@ -1111,10 +1102,12 @@
{
printf "
I do not know the Ultimate Question,
however I can help you build a more
powerful Ruby which can compute the
- Ultimate Question.
+ Ultimate Question:
+
+ $ rvm install rbx
"
return 0
}