FIX: S3 rake task can ignore yarn.lock

This commit is contained in:
Robin Ward 2020-04-29 13:13:44 -04:00
parent bc1f7bd659
commit 08fbf199ad
1 changed files with 18 additions and 19 deletions

View File

@ -71,11 +71,8 @@ def assets
manifest.assets.each do |_, path|
fullpath = (Rails.root + "public/assets/#{path}").to_s
mime = MiniMime.lookup_by_filename(fullpath)
if mime.nil?
STDERR.puts "ERROR: could not determine mime type for #{fullpath}"
end
# Ignore files we can't find the mime type of, like yarn.lock
if mime = MiniMime.lookup_by_filename(fullpath)
content_type = mime.content_type
asset_path = "assets/#{path}"
@ -94,6 +91,8 @@ def assets
end
end
end
results
end