Remove unecessary logic to skip parent folder creation when preparing bucket symlinks
This commit is contained in:
parent
c4db3c1ef4
commit
44aa6a6c54
1 changed files with 2 additions and 2 deletions
|
@ -43,13 +43,13 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
# TODO: "merge" symlink and user_symlink methods
|
||||
def symlink(guest_path, bucket_path = "/tmp/vagrant-cache/#{@name}", create_parent: true)
|
||||
def symlink(guest_path, bucket_path = "/tmp/vagrant-cache/#{@name}")
|
||||
return if @env[:cache_dirs].include?(guest_path)
|
||||
|
||||
@env[:cache_dirs] << guest_path
|
||||
comm.execute("mkdir -p #{bucket_path}")
|
||||
unless symlink?(guest_path)
|
||||
comm.sudo("mkdir -p `dirname #{guest_path}`") if create_parent
|
||||
comm.sudo("mkdir -p `dirname #{guest_path}`")
|
||||
if empty_dir?(bucket_path) && !empty_dir?(guest_path)
|
||||
# Warm up cache with guest machine data
|
||||
comm.sudo("shopt -s dotglob && mv #{guest_path}/* #{bucket_path}")
|
||||
|
|
Loading…
Reference in a new issue