Skip to content

Commit df972cf

Browse files
committed
add found manifests to multiple manifests warning
1 parent 4b45513 commit df972cf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/sprockets/manifest_utils.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +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-
logger.warn('Found multiple manifests. Choosing the first alphabetically.')
41+
logger.warn("Found multiple manifests: #{manifest_entries}. Choosing the first alphabetically: #{manifest_entries.first}")
4242
end
4343
entry = manifest_entries.first || generate_manifest_path
4444
File.join(dirname, entry)

test/test_manifest_utils.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ def test_warn_on_two
3232
find_directory_manifest("#{root}/with_two_manifests", logger)
3333
output = r.gets
3434

35-
assert_match(/W, \[[^\]]+\] WARN -- : Found multiple manifests. Choosing the first alphabetically/, output)
35+
assert_match(/W, \[[^\]]+\] WARN -- : Found multiple manifests: .+ Choosing the first alphabetically: \.sprockets-manifest-00000000000000000000000000000000\.json/, output)
3636
end
3737
end

0 commit comments

Comments
 (0)