Commit b87c6579 authored by iv's avatar iv

fixup! NXD lib/tasks/gitlab/check: Exit with non-zero code, if something failed in a check task

Use component.color(:<color name>) instead of component.<color name>
parent 50f6b1fa
# if we ever print anything in red - that's an error # if we ever print anything in red - that's an error
$check_failed = false $check_failed = false
class String
alias_method :orig_red, :red
def red(*args)
$check_failed = true
orig_red(*args)
end
end
namespace :gitlab do namespace :gitlab do
desc "GitLab | Check the configuration of GitLab and its environment" desc "GitLab | Check the configuration of GitLab and its environment"
...@@ -844,7 +837,7 @@ namespace :gitlab do ...@@ -844,7 +837,7 @@ namespace :gitlab do
def finished_checking(component) def finished_checking(component)
puts "" puts ""
puts "Checking #{component.yellow} ... #{$check_failed ? "Failed".red : "OK".green}" puts "Checking #{component.color(:yellow)} ... #{$check_failed ? "Failed".color(:red) : "OK".color(:green)}"
puts "" puts ""
exit 1 if $check_failed exit 1 if $check_failed
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment