Don't load plugins.json plugins in Bundler env
This commit is contained in:
parent
64921db66f
commit
72e0a691db
|
@ -3,6 +3,9 @@
|
|||
IMPROVEMENTS:
|
||||
|
||||
- More robust SSH connection close detection.
|
||||
- Don't load `vagrant plugin` installed plugins when in a Bundler
|
||||
environment. This happens during plugin development. This will make
|
||||
Vagrant errors much quieter when developing plugins.
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
|
|
|
@ -636,6 +636,16 @@ module Vagrant
|
|||
ENV["GEM_PATH"] = "#{@gems_path}#{::File::PATH_SEPARATOR}#{ENV["GEM_PATH"]}"
|
||||
::Gem.clear_paths
|
||||
|
||||
# If we're in a Bundler environment, don't load plugins. This only
|
||||
# happens in plugin development environments.
|
||||
if defined?(Bundler)
|
||||
require 'bundler/shared_helpers'
|
||||
if Bundler::SharedHelpers.in_bundle?
|
||||
@logger.warn("In a bundler environment, not loading environment plugins!")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
# Load the plugins
|
||||
plugins_json_file = @home_path.join("plugins.json")
|
||||
@logger.debug("Loading plugins from: #{plugins_json_file}")
|
||||
|
|
Loading…
Reference in New Issue