Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves #766 suggest to users run --help command #771

Closed
wants to merge 1 commit into from

Conversation

GeorgeGkas
Copy link

Adding one more console.error statements to bellow methods:

  • Command.prototype.missingArgument
  • Command.prototype.optionMissingArgument
  • Command.prototype.unknownOption
  • Command.prototype.variadicArgNotLast

This console.error messages propose to user run the same command
with --help option to get more info about the command which try
to run. This is something that most UNIX like commands do
(like rm, cp, mv, etc)

Adding one more console.error statements to bellow methods:
- Command.prototype.missingArgument
- Command.prototype.optionMissingArgument
- Command.prototype.unknownOption
- Command.prototype.variadicArgNotLast

This console.error messages propose to user run the same command
with `--help` option to get more info about the command which try
to run. This is something that most UNIX like commands do
(like rm, cp, mv, etc)
@shadowspawn
Copy link
Collaborator

I am closing this PR as has not had recent activity and there are multiple conflicts, and it is a simple change so easier to make it again fresh after discussing desired error format in #766.

I found there is already one error in commander which suggests trying --help and on a single line like git does. I think this is probably tidier, but have not worked through all four cases that are in this PR to check it will look ok.

      console.error('error: %s(1) does not exist, try --help', bin);

Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants