From bd378ea2b09fdea2031555e628bec7cac666373a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 18 Jul 2013 11:58:11 -0400 Subject: [PATCH] VAGRANT_DOTFILE_PATH [GH-1524] --- CHANGELOG.md | 2 ++ lib/vagrant/environment.rb | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 035e79129..594e3e8b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ IMPROVEMENTS: - Puppet will run without color if the UI is not colored. [GH-1344] - Chef supports the "formatter" configuration for setting the formatter. [GH-1250] + - VAGRANT_DOTFILE_PATH environmental variable reintroduces the + functionality removed in 1.1 from "config.dotfile_name" [GH-1524] BUG FIXES: diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index c62ab726c..56b808dd6 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -117,11 +117,10 @@ 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. - @local_data_path = nil + opts[:local_data_path] ||= ENV["VAGRANT_DOTFILE_PATH"] + 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)) - elsif !root_path.nil? - @local_data_path = root_path.join(DEFAULT_LOCAL_DATA) end setup_local_data_path