From 5520cf65d6f27e4622efe9e4d24cc0caed222cf2 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 28 Sep 2018 16:44:50 -0700 Subject: [PATCH] Add warning if Vagrantfile inside box is ignored --- lib/vagrant/vagrantfile.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/vagrant/vagrantfile.rb b/lib/vagrant/vagrantfile.rb index 5ac4bf987..0c5f871e9 100644 --- a/lib/vagrant/vagrantfile.rb +++ b/lib/vagrant/vagrantfile.rb @@ -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