Add EX_USAGE constant in CLI class
This commit is contained in:
parent
512c380517
commit
4d34f66ec5
@ -5,13 +5,15 @@ module Producer
|
||||
|
||||
USAGE = "Usage: #{File.basename $0} recipe_file"
|
||||
|
||||
EX_USAGE = 64
|
||||
|
||||
class << self
|
||||
def run!(arguments, output: $stderr)
|
||||
begin
|
||||
cli = new(arguments)
|
||||
rescue ArgumentError
|
||||
output.puts USAGE
|
||||
exit 64
|
||||
exit EX_USAGE
|
||||
end
|
||||
cli.run!
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user