From c9ca5c0598904f5e364069f15f47a0089941c9b8 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 20 Mar 2021 16:15:16 -0500 Subject: [PATCH] rake: fix images:manifest failing on file permission errors. Fix images:manifest failing with an exception when a file can't be opened because we don't have permission to access the file. --- lib/tasks/images.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/images.rake b/lib/tasks/images.rake index 84f1d1505..1bdcff3c1 100644 --- a/lib/tasks/images.rake +++ b/lib/tasks/images.rake @@ -25,8 +25,8 @@ namespace :images do hash = { path: File.absolute_path(path), name: File.basename(path, ".*"), - md5: file.md5, - size: file.file_size, + md5: file&.md5, + size: file&.file_size, error: e.message, }