lib/vagrant/command/gem.rb in vagrant-1.0.1 vs lib/vagrant/command/gem.rb in vagrant-1.0.2
- old
+ new
@@ -1,11 +1,15 @@
require "rubygems"
require "rubygems/gem_runner"
+require "vagrant/util/safe_puts"
+
module Vagrant
module Command
class Gem < Base
+ include Util::SafePuts
+
def execute
# Bundler sets up its own custom gem load paths such that our
# own gems are never loaded. Therefore, give an error if a user
# tries to install gems while within a Bundler-managed environment.
if defined?(Bundler)
@@ -18,10 +22,10 @@
# If the user needs some help, we add our own little message at the
# top so that they're aware of what `vagrant gem` is doing, really.
if @argv.empty? || @argv.include?("-h") || @argv.include?("--help")
@env.ui.info(I18n.t("vagrant.commands.gem.help_preamble"),
:prefix => false)
- puts
+ safe_puts
end
# We just proxy the arguments onto a real RubyGems command
# but change `GEM_HOME` so that the gems are installed into
# our own private gem folder.