DEV: Only raise rake themes:update errors when flag provided (#16254)

Switching behavior based on multisite/single-site configuration can create some difficult-to-debug situations. The flag is much more obvious.
This commit is contained in:
David Taylor 2022-03-22 17:02:14 +00:00 committed by GitHub
parent f0e87aa35f
commit 9df28fe4b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ def update_themes
raise RemoteTheme::ImportError.new(remote_theme.last_error_text) if remote_theme.last_error_text.present?
rescue => e
STDERR.puts "Failed to update '#{theme.name}': #{e}"
raise if ENV["RAISE_THEME_ERRORS"] != "0" && (ENV["RAISE_THEME_ERRORS"] == "1" || RailsMultisite::ConnectionManagement.current_db == "default")
raise if ENV["RAISE_THEME_ERRORS"] == "1"
end
end