Another try, without string substitution
This commit is contained in:
parent
9ebc028745
commit
188a7dab0c
|
@ -157,21 +157,16 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
# Setup the local data directory. If a configuration path is given,
|
# Setup the local data directory. If a configuration path is given,
|
||||||
# it is expanded relative to the root path or to the working directory
|
# it is expanded relative to the root path. Otherwise, we use the
|
||||||
# depending on whether it starts with the "{}" placeholder. Otherwise,
|
# default (which is also expanded relative to the root path).
|
||||||
# we use the default which is expanded relative to the root path.
|
|
||||||
if ENV.has_key?("VAGRANT_DOTFILE_PATH") && !opts[:child]
|
if ENV.has_key?("VAGRANT_DOTFILE_PATH") && !opts[:child]
|
||||||
dotfile_path = ENV["VAGRANT_DOTFILE_PATH"]
|
opts[:local_data_path] ||= root_path.join(ENV["VAGRANT_DOTFILE_PATH"]) if !root_path.nil?
|
||||||
if dotfile_path.match(/^\{\}/) && !root_path.nil?
|
|
||||||
opts[:local_data_path] = File.join(root_path, dotfile_path.sub(/^\{\}/, ''))
|
|
||||||
else
|
|
||||||
opts[:local_data_path] = dotfile_path
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
opts[:local_data_path] ||= root_path.join(DEFAULT_LOCAL_DATA) if !root_path.nil?
|
opts[:local_data_path] ||= root_path.join(DEFAULT_LOCAL_DATA) if !root_path.nil?
|
||||||
if opts[:local_data_path]
|
if opts[:local_data_path]
|
||||||
@local_data_path = Pathname.new(File.expand_path(opts[:local_data_path], @cwd))
|
@local_data_path = Pathname.new(File.expand_path(opts[:local_data_path], @cwd))
|
||||||
end
|
end
|
||||||
|
@logger.debug("Effective local data path: #{@local_data_path}")
|
||||||
|
|
||||||
# If we have a root path, load the ".vagrantplugins" file.
|
# If we have a root path, load the ".vagrantplugins" file.
|
||||||
if root_path
|
if root_path
|
||||||
|
|
Loading…
Reference in New Issue