Skip to content

Commit

Permalink
Merge pull request #626 from amatsuda/sort_manifest_entries
Browse files Browse the repository at this point in the history
Sort manifest entries alphabetically before choosing one
  • Loading branch information
schneems authored Sep 17, 2019
2 parents 1bcee8e + b416821 commit cbf3b82
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 cbf3b82

Please sign in to comment.