diff --git a/bin/vagrant b/bin/vagrant index 98f7e2e3b..6492989d6 100755 --- a/bin/vagrant +++ b/bin/vagrant @@ -156,7 +156,7 @@ begin logger.debug("Creating Vagrant environment") env = Vagrant::Environment.new(opts) - if !Vagrant.in_installer? + if !Vagrant.in_installer? && !Vagrant.very_quiet? # If we're not in the installer, warn. env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false) end diff --git a/lib/vagrant/pre-rubygems.rb b/lib/vagrant/pre-rubygems.rb index 4d7e9806d..63b46f594 100644 --- a/lib/vagrant/pre-rubygems.rb +++ b/lib/vagrant/pre-rubygems.rb @@ -2,9 +2,11 @@ # initializes the Bundler context so that Vagrant and its associated plugins # can load properly, and then execs out into Vagrant again. +require_relative "shared_helpers" + if defined?(Bundler) require "bundler/shared_helpers" - if Bundler::SharedHelpers.in_bundle? + if Bundler::SharedHelpers.in_bundle? && !Vagrant.very_quiet? puts "Vagrant appears to be running in a Bundler environment. Your " puts "existing Gemfile will be used. Vagrant will not auto-load any plugins" puts "installed with `vagrant plugin`. Vagrant will autoload any plugins in" @@ -16,7 +18,6 @@ end require_relative "bundler" require_relative "plugin/manager" -require_relative "shared_helpers" plugins = Vagrant::Plugin::Manager.instance.installed_plugins Vagrant::Bundler.instance.init!(plugins) diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb index 9f3a9db1f..55d68f200 100644 --- a/lib/vagrant/shared_helpers.rb +++ b/lib/vagrant/shared_helpers.rb @@ -32,6 +32,13 @@ module Vagrant !ENV["VAGRANT_NO_PLUGINS"] end + # Whether or not super quiet mode is enabled. This is ill-advised. + # + # @return [Boolean] + def self.very_quiet? + !!ENV["VAGRANT_I_KNOW_WHAT_IM_DOING_PLEASE_BE_QUIET"] + end + # Returns the URL prefix to the server. # # @return [String]