lib/bolt/applicator.rb in bolt-3.8.1 vs lib/bolt/applicator.rb in bolt-3.9.0

- old
+ new

@@ -304,14 +304,15 @@ output = Minitar::Output.new(Zlib::GzipWriter.new(sio)) Puppet.lookup(:current_environment).override_with(modulepath: @plugin_dirs).modules.each do |mod| search_dirs = yield mod - parent = Pathname.new(mod.path).parent + tar_dir = Pathname.new(mod.name) # goes great with fish + mod_dir = Pathname.new(mod.path) files = Find.find(*search_dirs).select { |file| File.file?(file) } files.each do |file| - tar_path = Pathname.new(file).relative_path_from(parent) + tar_path = tar_dir + Pathname.new(file).relative_path_from(mod_dir) @logger.trace("Packing plugin #{file} to #{tar_path}") stat = File.stat(file) content = File.binread(file) output.tar.add_file_simple( tar_path.to_s,