Add a warning if dotfile_name is used in V1

This commit is contained in:
Mitchell Hashimoto 2013-02-05 22:16:08 -08:00
parent f8c7622414
commit 6e0015db19
1 changed files with 13 additions and 3 deletions

View File

@ -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