You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some parameter and option validations that the library catches and leaves no option to the library client. By default, SystemExit exception is raised. Some of those errors would be Cri::Parser::IllegalOptionError, Cri::ArgumentList::ArgumentCountMismatchError. But there are others as well.
To illustrate, a simple use case: when the user does not provide positional parameter:
param :filename
run do |opts, args, cmd|
puts "Reading #{args[:filename]}"
end
% ./mycommand
mycommand: incorrect number of arguments given: expected 1, but got 0
The message is clear, but mycommand would like to print help message for instance.
The issue is not a big deal, but still nice to have.
Any way to have this behavior I could miss?
The text was updated successfully, but these errors were encountered:
There are some parameter and option validations that the library catches and leaves no option to the library client. By default,
SystemExit
exception is raised. Some of those errors would beCri::Parser::IllegalOptionError
,Cri::ArgumentList::ArgumentCountMismatchError
. But there are others as well.To illustrate, a simple use case: when the user does not provide positional parameter:
The message is clear, but
mycommand
would like to print help message for instance.The issue is not a big deal, but still nice to have.
Any way to have this behavior I could miss?
The text was updated successfully, but these errors were encountered: