Skip to content

Commit b416821

Browse files
committed
Sort manifest entries alphabetically before choosing one
1 parent 1bcee8e commit b416821

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/sprockets/manifest_utils.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def find_directory_manifest(dirname, logger = Logger.new($stderr))
3838
entries = File.directory?(dirname) ? Dir.entries(dirname) : []
3939
manifest_entries = entries.select { |e| e =~ MANIFEST_RE }
4040
if manifest_entries.length > 1
41+
manifest_entries.sort!
4142
logger.warn("Found multiple manifests: #{manifest_entries}. Choosing the first alphabetically: #{manifest_entries.first}")
4243
end
4344
entry = manifest_entries.first || generate_manifest_path

0 commit comments

Comments
 (0)