From 150cae86b7068296c13ffbb14ff45c73cf35534d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 2 Feb 2013 23:33:52 -0800 Subject: [PATCH] Only show error if exit code != 0 of gem --- plugins/commands/plugin/gem_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/commands/plugin/gem_helper.rb b/plugins/commands/plugin/gem_helper.rb index d7fd81b49..8fdeee6ef 100644 --- a/plugins/commands/plugin/gem_helper.rb +++ b/plugins/commands/plugin/gem_helper.rb @@ -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