Skip to content

Commit

Permalink
Sort manifest entries alphabetically before choosing one
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Sep 16, 2019
1 parent 1bcee8e commit b416821
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sprockets/manifest_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def find_directory_manifest(dirname, logger = Logger.new($stderr))
entries = File.directory?(dirname) ? Dir.entries(dirname) : []
manifest_entries = entries.select { |e| e =~ MANIFEST_RE }
if manifest_entries.length > 1
manifest_entries.sort!
logger.warn("Found multiple manifests: #{manifest_entries}. Choosing the first alphabetically: #{manifest_entries.first}")
end
entry = manifest_entries.first || generate_manifest_path
Expand Down

0 comments on commit b416821

Please sign in to comment.