docopt.rb icon indicating copy to clipboard operation
docopt.rb copied to clipboard

Version 0.6 changed behavior with unknown arguments

Open DannyBen opened this issue 7 years ago • 5 comments

Although I am happy to see a new 0..6 version, it introduces what I assume is an unintended behavior.

With the previous 0.5 version, when running the command with an unrecognized argument, docopt would output something like:

--param_name is unrecognized
Usage
  ...

With the new version, it does not output the error line, only the usage.

I see the last merge removed this line from a couple of places

raise tokens.error, "#{raw} is not recognized"

DannyBen avatar Apr 07 '17 08:04 DannyBen

Ah right, that's not intended - I guess that part is not covered in the tests

alexspeller avatar Apr 07 '17 15:04 alexspeller

@ryanartecona were those errors removed intentionally?

alexspeller avatar Apr 08 '17 01:04 alexspeller

Not intentionally as far as I remember.

On Fri, Apr 7, 2017 at 8:19 PM Alex Speller [email protected] wrote:

@ryanartecona https://github.com/ryanartecona were those errors removed intentionally?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/docopt/docopt.rb/issues/29#issuecomment-292685074, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2Uh5PH3kkR3Fh5i6v0sd4v6m6k53nSks5rtuC3gaJpZM4M2ntl .

-- Ryan Artecona

ryanartecona avatar Apr 08 '17 02:04 ryanartecona

Any chance of bringing it back to the original behavior soon (as in 0.6.1)?

DannyBen avatar Jul 14 '17 06:07 DannyBen

Ahm.... bump?

DannyBen avatar Oct 13 '17 14:10 DannyBen