diff --git a/lib/sprockets/manifest_utils.rb b/lib/sprockets/manifest_utils.rb index c115c6e29..703fa1f6e 100644 --- a/lib/sprockets/manifest_utils.rb +++ b/lib/sprockets/manifest_utils.rb @@ -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