allow the alias file path to be defined via an environment variable

This commit is contained in:
Zachary Flower 2018-02-25 22:24:36 -07:00
parent 42f72e1099
commit 3dbcdea691
1 changed files with 3 additions and 1 deletions

View File

@ -126,9 +126,11 @@ module Vagrant
@data_dir = @home_path.join("data")
@gems_path = Vagrant::Bundler.instance.plugin_gem_path
@tmp_path = @home_path.join("tmp")
@aliases_path = @home_path.join("aliases")
@machine_index_dir = @data_dir.join("machine-index")
@aliases_path = Pathname.new(ENV["VAGRANT_ALIAS_FILE"]).expand_path if ENV.key?("VAGRANT_ALIAS_FILE")
@aliases_path ||= @home_path.join("aliases")
# Prepare the directories
setup_home_path