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

This commit is contained in:
Jeff Wong 2021-04-05 12:53:34 -10:00 committed by GitHub
parent 89f1bb7d2a
commit 3a22c654e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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