Skip to content

Commit da56a8c

Browse files
Matt Whiteleywhiteley
Matt Whiteley
authored andcommitted
Stop uploading empty directories
1 parent 44ff889 commit da56a8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/kitchen/provisioner/chef_base.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ def prepare_cookbooks
292292
def filter_only_cookbook_files
293293
info("Removing non-cookbook files before transfer")
294294
FileUtils.rm(all_files_in_cookbooks - only_cookbook_files)
295+
Dir.glob(File.join(tmpbooks_dir, "**/"), File::FNM_PATHNAME).
296+
reverse_each { |fn| FileUtils.rmdir(fn) if Dir.entries(fn).size == 2 }
295297
end
296298

297299
# Generates a list of all files in the cookbooks directory in the

0 commit comments

Comments
 (0)