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"
|
USAGE = "Usage: #{File.basename $0} recipe_file"
|
||||||
|
|
||||||
|
EX_USAGE = 64
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
def run!(arguments, output: $stderr)
|
def run!(arguments, output: $stderr)
|
||||||
begin
|
begin
|
||||||
cli = new(arguments)
|
cli = new(arguments)
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
output.puts USAGE
|
output.puts USAGE
|
||||||
exit 64
|
exit EX_USAGE
|
||||||
end
|
end
|
||||||
cli.run!
|
cli.run!
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user