core: ignore VAGRANT_DOTFILE_PATH if a child environment

This causes issues since the child environment almost certainly doesn't
share data with the parent. In a larger scope, we should find a way to
encode the data path somehow on `vagrant up`.
This commit is contained in:
Mitchell Hashimoto 2015-10-11 18:38:08 -04:00
parent c88d52082a
commit c17efbed75
1 changed files with 2 additions and 1 deletions

View File

@ -159,7 +159,7 @@ module Vagrant
# Setup the local data directory. If a configuration path is given,
# then it is expanded relative to the working directory. Otherwise,
# we use the default which is expanded relative to the root path.
opts[:local_data_path] ||= ENV["VAGRANT_DOTFILE_PATH"]
opts[:local_data_path] ||= ENV["VAGRANT_DOTFILE_PATH"] if !opts[:child]
opts[:local_data_path] ||= root_path.join(DEFAULT_LOCAL_DATA) if !root_path.nil?
if opts[:local_data_path]
@local_data_path = Pathname.new(File.expand_path(opts[:local_data_path], @cwd))
@ -427,6 +427,7 @@ module Vagrant
Util::SilenceWarnings.silence! do
Environment.new({
child: true,
cwd: path,
home_path: home_path,
ui_class: ui_class,