DEV: Better error handling for s3 task

This commit is contained in:
Robin Ward 2020-04-29 12:54:22 -04:00
parent cbb27241c4
commit 9ec908950d

View File

@ -71,7 +71,12 @@ def assets
manifest.assets.each do |_, path| manifest.assets.each do |_, path|
fullpath = (Rails.root + "public/assets/#{path}").to_s fullpath = (Rails.root + "public/assets/#{path}").to_s
content_type = MiniMime.lookup_by_filename(fullpath).content_type mime = MiniMime.lookup_by_filename(fullpath)
if mime.nil?
STDERR.puts "ERROR: could not determine mime type for #{fullpath}"
end
content_type = mime.content_type
asset_path = "assets/#{path}" asset_path = "assets/#{path}"
results << [fullpath, asset_path, content_type] results << [fullpath, asset_path, content_type]