lib/cl/runner/default.rb in cl-1.1.2 vs lib/cl/runner/default.rb in cl-1.1.3
- old
+ new
@@ -19,9 +19,11 @@
@const, @args = lookup(args)
end
def run
cmd.help? ? help.run : cmd.run
+ rescue OptionParser::InvalidOption => e
+ raise UnknownOption.new(const, e.message)
end
def cmd
@cmd ||= const.new(ctx, args)
end