Skip to content

Commit 0e80058

Browse files
author
Danilo Sousa
committed
make sure to only try to read files from tar object - closes #31
this fix the problem with some modules that include PaxHeaders and cause a unexpected token when reading the tar file.
1 parent ac9618c commit 0e80058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet_forge_server/utils/archiver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read_from_archive(archive, name_regex)
2424
tar.rewind
2525
files = {}
2626
tar.each do |obj|
27-
files[obj.full_name] = obj.read if obj.full_name =~ name_regex
27+
files[obj.full_name] = obj.read if obj.file? && obj.full_name =~ name_regex
2828
end
2929
return files unless files.empty?
3030
raise "Given name #{name_regex} not found in #{archive}"

0 commit comments

Comments
 (0)