Skip to content

Commit bf8c104

Browse files
author
Ilja Bobkevic
committed
Merge pull request #30 from unibet/fix-metadata-regex
Fix metadata.json regex for directory backend
2 parents 6f1b224 + 6c896bc commit bf8c104

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet_forge_server/backends/directory.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def upload(file_data)
5757

5858
private
5959
def read_metadata(archive_path)
60-
metadata_file = read_from_archive(archive_path, %r[[^/]+/metadata\.json$])
60+
metadata_file = read_from_archive(archive_path, %r[^([^/]+/)?metadata\.json$])
6161
JSON.parse(metadata_file)
6262
rescue => error
6363
warn "Error reading from module archive #{archive_path}: #{error}"

0 commit comments

Comments
 (0)