FIX: Don't fail if `s3_install_cors_rule` is off (#14865)

FIX: Don’t fail if s3_install_cors_rule is off (#14865)

Regressed in #14802

diff --git a/lib/tasks/s3.rake b/lib/tasks/s3.rake
index 954ba60..0e15862 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]}."

GitHub sha: 25ef395af84dae4e8a4555a4657baebddbec9f10

This commit appears in #14865 which was approved by martin. It was merged by martin.