Change variable to override_base_directory

This commit is contained in:
Avi Oza 2017-05-02 19:42:26 -04:00
parent fa581a325e
commit 6c8d8eec3f
2 changed files with 5 additions and 5 deletions

View file

@ -48,16 +48,16 @@ module VagrantPlugins
bucket_name = @box_name
end
# An override directory has been specified. Use this as the base instead of the standard directory
if !@env[:machine].config.cache.override_directory.nil?
base_path = Pathname.new(@env[:machine].config.cache.override_directory)
if !@env[:machine].config.cache.override_base_directory.nil?
base_path = Pathname.new(@env[:machine].config.cache.override_base_directory)
else
base_path = @env[:home_path]
end
base_path.join('cache', bucket_name)
when :machine
# An override directory has been specified. Use this as the base instead of the standard directory
if !@env[:machine].config.cache.override_directory.nil?
base_path = Pathname.new(@env[:machine].config.cache.override_directory)
if !@env[:machine].config.cache.override_base_directory.nil?
base_path = Pathname.new(@env[:machine].config.cache.override_base_directory)
base_path += @env[:machine].name.to_s
else
base_path = @env[:machine].data_dir.parent

View file

@ -1,7 +1,7 @@
module VagrantPlugins
module Cachier
class Config < Vagrant.plugin(2, :config)
attr_accessor :scope, :auto_detect, :synced_folder_opts, :override_directory
attr_accessor :scope, :auto_detect, :synced_folder_opts, :override_base_directory
attr_reader :buckets
ALLOWED_SCOPES = %w( box machine )