Don't use the RC file, use the JSOn state file
This commit is contained in:
parent
bc54875a25
commit
693b825eb1
|
@ -15,7 +15,6 @@ module Vagrant
|
||||||
class Environment
|
class Environment
|
||||||
DEFAULT_HOME = "~/.vagrant.d"
|
DEFAULT_HOME = "~/.vagrant.d"
|
||||||
DEFAULT_LOCAL_DATA = ".vagrant"
|
DEFAULT_LOCAL_DATA = ".vagrant"
|
||||||
DEFAULT_RC = "~/.vagrantrc"
|
|
||||||
|
|
||||||
# The `cwd` that this environment represents
|
# The `cwd` that this environment represents
|
||||||
attr_reader :cwd
|
attr_reader :cwd
|
||||||
|
@ -598,12 +597,14 @@ module Vagrant
|
||||||
::Gem.clear_paths
|
::Gem.clear_paths
|
||||||
|
|
||||||
# Load the plugins
|
# Load the plugins
|
||||||
rc_path = File.expand_path(ENV["VAGRANT_RC"] || DEFAULT_RC)
|
plugins_json_file = @home_path.join("plugins.json")
|
||||||
if File.file?(rc_path) && @@loaded_rc.add?(rc_path)
|
@logger.debug("Loading plugins from: #{plugins_json_file}")
|
||||||
@logger.debug("Loading RC file: #{rc_path}")
|
if plugins_json_file.file?
|
||||||
load rc_path
|
data = JSON.parse(plugins_json_file.read)
|
||||||
else
|
data["installed"].each do |plugin|
|
||||||
@logger.debug("RC file not found. Not loading: #{rc_path}")
|
@logger.info("Loading plugin from JSON: #{plugin}")
|
||||||
|
Vagrant.require_plugin(plugin)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue