Handle CLI failure exit status at the top-level script (#28322)
This commit is contained in:
parent
881e8c113c
commit
0e0a94f483
27 changed files with 150 additions and 320 deletions
|
@ -30,10 +30,7 @@ module Mastodon::CLI
|
|||
it at the root.
|
||||
LONG_DESC
|
||||
def add(*domains)
|
||||
if domains.empty?
|
||||
say('No domain(s) given', :red)
|
||||
exit(1)
|
||||
end
|
||||
fail_with_message 'No domain(s) given' if domains.empty?
|
||||
|
||||
skipped = 0
|
||||
processed = 0
|
||||
|
@ -76,10 +73,7 @@ module Mastodon::CLI
|
|||
|
||||
desc 'remove DOMAIN...', 'Remove e-mail domain blocks'
|
||||
def remove(*domains)
|
||||
if domains.empty?
|
||||
say('No domain(s) given', :red)
|
||||
exit(1)
|
||||
end
|
||||
fail_with_message 'No domain(s) given' if domains.empty?
|
||||
|
||||
skipped = 0
|
||||
processed = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue