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
|
@ -20,10 +20,7 @@ module Mastodon::CLI
|
|||
option to overwrite it.
|
||||
LONG_DESC
|
||||
def add(*addresses)
|
||||
if addresses.empty?
|
||||
say('No IP(s) given', :red)
|
||||
exit(1)
|
||||
end
|
||||
fail_with_message 'No IP(s) given' if addresses.empty?
|
||||
|
||||
skipped = 0
|
||||
processed = 0
|
||||
|
@ -70,10 +67,7 @@ module Mastodon::CLI
|
|||
cover the given IP(s).
|
||||
LONG_DESC
|
||||
def remove(*addresses)
|
||||
if addresses.empty?
|
||||
say('No IP(s) given', :red)
|
||||
exit(1)
|
||||
end
|
||||
fail_with_message 'No IP(s) given' if addresses.empty?
|
||||
|
||||
processed = 0
|
||||
skipped = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue