Skip to content

A platform for community discussion. Free, open, simple.

FIX: rake themes:update should fail if a theme update fails (#12608)

Jeff Wong3a22c654e29e
diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake
index 3ac9c33672d..05674767466 100644
--- a/lib/tasks/themes.rake
+++ b/lib/tasks/themes.rake
@@ -59,11 +59,16 @@ task "themes:update" => :environment do |task, args|
puts "Updating #{theme.name}..."
theme.remote_theme.update_from_remote
theme.save!
+ unless theme.remote_theme.last_error_text.nil?
+ puts "Error updating #{theme.name}: #{theme.remote_theme.last_error_text}"
+ exit 1
+ end
end
rescue => e
STDERR.puts "Failed to update #{theme.name}"
STDERR.puts e
STDERR.puts e.backtrace
+ exit 1
end
end
end