From 25ef395af84dae4e8a4555a4657baebddbec9f10 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 9 Nov 2021 23:00:30 +0100 Subject: [PATCH] FIX: Don't fail if `s3_install_cors_rule` is off (#14865) Regressed in #14802 --- lib/tasks/s3.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tasks/s3.rake b/lib/tasks/s3.rake index 954ba60fb78..0e158621278 100644 --- a/lib/tasks/s3.rake +++ b/lib/tasks/s3.rake @@ -177,6 +177,11 @@ task 's3:ensure_cors_rules' => :environment do puts "Installing CORS rules..." result = S3CorsRulesets.sync(use_db_s3_config: use_db_s3_config) + if !result + puts "skipping" + return + end + puts "Assets rules status: #{result[:assets_rules_status]}." puts "Backup rules status: #{result[:backup_rules_status]}." puts "Direct upload rules status: #{result[:direct_upload_rules_status]}."