FIX: rake themes:install error if theme cannot be updated (#12605)

Count errors on updating themes in the error bucket. Otherwise,
there was a chance that this could hide errors eg, if a deploy key to a
private repo were to be deleted. Admins probably would like to know about this.
This commit is contained in:
Jeff Wong
2021-04-05 14:52:50 -07:00
committed by GitHub
parent 3a18dd5681
commit 1ceefc22d5
+8 -3
View File
@@ -9,9 +9,13 @@ class ThemesInstallTask
next if installer.url.nil?
if installer.theme_exists?
installer.update
log << "#{name}: is already installed. Updating from remote."
counts[:updated] += 1
if installer.update
log << "#{name}: is already installed. Updating from remote."
counts[:updated] += 1
else
log << "#{name}: is already installed, but there was an error updating from remote."
counts[:errors] += 1
end
else
begin
installer.install
@@ -63,6 +67,7 @@ class ThemesInstallTask
@remote_theme.update_from_remote
@theme.save
add_component_to_all_themes
@remote_theme.last_error_text.nil?
end
def add_component_to_all_themes