From 6e0015db193586f67525195d34f97f45e2c7211e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 5 Feb 2013 22:16:08 -0800 Subject: [PATCH] Add a warning if dotfile_name is used in V1 --- plugins/kernel_v1/config/vagrant.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/kernel_v1/config/vagrant.rb b/plugins/kernel_v1/config/vagrant.rb index ed77bc668..71c3280a4 100644 --- a/plugins/kernel_v1/config/vagrant.rb +++ b/plugins/kernel_v1/config/vagrant.rb @@ -11,10 +11,20 @@ module VagrantPlugins @host = UNSET_VALUE end - def upgrade(new) - new.vagrant.host = @host if @host != UNSET_VALUE + def finalize! + @dotfile_name = nil if @dotfile_name == UNSET_VALUE + @host = nil if @host == UNSET_VALUE + end - # TODO: Warn that "dotfile_name" is gone in V2 + def upgrade(new) + new.vagrant.host = @host if @host.nil? + + warnings = [] + if @dotfile_name + warnings << "`config.vm.dotfile_name` has no effect anymore." + end + + [warnings, []] end end end