Change variable to override_base_directory
This commit is contained in:
parent
fa581a325e
commit
6c8d8eec3f
2 changed files with 5 additions and 5 deletions
lib/vagrant-cachier
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue