Skip to content

No error message when an unknown option and two args are given#121

Closed
nitoyon wants to merge 1 commit intotj:masterfrom
nitoyon:fix-unknown
Closed

No error message when an unknown option and two args are given#121
nitoyon wants to merge 1 commit intotj:masterfrom
nitoyon:fix-unknown

Conversation

@nitoyon
Copy link

@nitoyon nitoyon commented Jan 26, 2013

When an option -u is not defined:

  • node foo.js -u -> unknown option error (expected)
  • node foo.js -u arg1 -> unknown option error (expected)
  • node foo.js -u arg1 arg2 -> NO ERROR (unexpected)

Another example: mocha --reporterrrr spec test (should be mocha --reporter spec test) shows no error.

This bug is caused by Command.parseArgs() assuming arg2 to be a command name.

@SomeKittens
Copy link
Collaborator

Closing, will reopen if this gets updated with latest master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Commander is not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants