add -i option as a requirement
parent
fadb688143
commit
b19a652d78
|
@ -54,7 +54,10 @@ Usage: #{__FILE__} [options]|
|
|||
|
||||
begin
|
||||
opts.parse!(args)
|
||||
|
||||
if options['input'] == nil
|
||||
puts opts
|
||||
raise OptionParser::MissingArgument, "-i is a required option"
|
||||
end
|
||||
unless ::File.exists?(options['input'])
|
||||
raise OptionParser::InvalidArgument, "Not found: #{options['input']}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue