Skip to content

Commit

Permalink
Bugfix, we have ruby at this point, might as well use it to generate …
Browse files Browse the repository at this point in the history
…a yaml output of the env ;).
  • Loading branch information
wayneeseguin committed Jun 6, 2011
1 parent 19d160d commit 97f9944
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/rvm/shell/shell_wrapper.sh
@@ -1,12 +1,9 @@
# Prints an epilog to a shell command.
__rvm_show_command_epilog() {
local last_command_result="$?"
local _code="$?"
echo "---------------RVM-RESULTS-START---------------"
echo " exit_status: \"$last_command_result\""
echo " environment: $(ruby -rrubygems -ryaml -e 'puts YAML.dump(ENV.inspect)')"
ruby -rrubygems -ryaml -e \
"puts YAML.dump({'environment' => ENV.to_hash, 'exit_status' => '${_code}'})"
echo "----------------RVM-RESULTS-END----------------"
#\env | \sed \
# -e "s#'#\\'#g" \
# -e 's#"#\\"#g' \
# -e "s#\\([^=]*\\)=\\(.*\\)# '\1': \"\2\"#"
}

0 comments on commit 97f9944

Please sign in to comment.