mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 11:25:24 +00:00
Exit with an error if there are errors with settings import (#6475)
If the site_settings import has any errors or settings that are not found, this will cause the task to exit with a non-zero exit code. This is useful when using this task as part of automated configuration deployment, where you may not want to continue with the process if a setting fails to import.
This commit is contained in:
parent
6275e745a7
commit
ddbed82bca
@ -29,4 +29,8 @@ task "site_settings:import" => :environment do
|
||||
puts " Updated: #{counts[:updated]}"
|
||||
puts " Not Found: #{counts[:not_found]}"
|
||||
puts " Errors: #{counts[:errors]}"
|
||||
|
||||
if counts[:not_found] + counts[:errors] > 0
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user