Only show error if exit code != 0 of gem

This commit is contained in:
Mitchell Hashimoto 2013-02-02 23:33:52 -08:00
parent fa50f06a4c
commit 150cae86b7
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ module VagrantPlugins
# This means that something forced an exit within RubyGems.
# We capture this to check whether it succeeded or not by
# checking the "exit_code"
raise Vagrant::Errors::PluginGemError, :output => gem_ui.errs.string.chomp if e != 0
raise Vagrant::Errors::PluginGemError,
:output => gem_ui.errs.string.chomp if e.exit_code != 0
ensure
# Restore the old GEM_HOME
ENV["GEM_HOME"] = old_gem_home