Add warning if Vagrantfile inside box is ignored

This commit is contained in:
Brian Cain 2018-09-28 16:44:50 -07:00
parent f6ae328346
commit 5520cf65d6
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
require "vagrant/util/template_renderer"
require "log4r"
module Vagrant
# This class provides a way to load and access the contents
@ -26,6 +27,7 @@ module Vagrant
@keys = keys
@loader = loader
@config, _ = loader.load(keys)
@logger = Log4r::Logger.new("vagrant::vagrantfile")
end
# Returns a {Machine} for the given name and provider that
@ -201,6 +203,8 @@ module Vagrant
@loader.set(box_config_key, box_vagrantfile)
local_keys.unshift(box_config_key)
config, config_warnings, config_errors = @loader.load(local_keys)
else
@logger.warn("Ignoring #{box.name} provided Vagrantfile inside box")
end
end
end