Handle CLI failure exit status at the top-level script (#28322)

This commit is contained in:
Matt Jankowski 2024-01-26 03:53:44 -05:00 committed by GitHub
parent 881e8c113c
commit 0e0a94f483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 150 additions and 320 deletions

View file

@ -110,17 +110,11 @@ module Mastodon::CLI
end
def verify_deploy_concurrency!
return unless options[:concurrency] < 1
say('Cannot run with this concurrency setting, must be at least 1', :red)
exit(1)
fail_with_message 'Cannot run with this concurrency setting, must be at least 1' if options[:concurrency] < 1
end
def verify_deploy_batch_size!
return unless options[:batch_size] < 1
say('Cannot run with this batch_size setting, must be at least 1', :red)
exit(1)
fail_with_message 'Cannot run with this batch_size setting, must be at least 1' if options[:batch_size] < 1
end
def progress_output_options