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

show suggestions after an error for an unknown command or option #572

Conversation

abetomo
Copy link
Contributor

@abetomo abetomo commented Sep 11, 2021

https://github.com/tj/commander.js#display-help-after-errors

command

before

% node-lambda depoly
Unknown command depoly

Usage: node-lambda [options] [command]

Options:
  -V, --version          output the version number
  -h, --help             display help for command

Commands:
  deploy [options]       Deploy your application to Amazon Lambda
  package|zip [options]  Create zipped package for Amazon Lambda deployment
  run|execute [options]  Run your Amazon Lambda application locally
  setup [options]        Sets up the .env file.
  help [command]         display help for command

after

% node-lambda depoly
error: unknown command 'depoly'
(Did you mean deploy?)

option

before

% node-lambda deploy --endponit
error: unknown option '--endponit'

after

% node-lambda deploy --endponit
error: unknown option '--endponit'
(Did you mean --endpoint?)

@DeviaVir DeviaVir merged commit abd3db5 into motdotla:master Sep 13, 2021
@abetomo abetomo deleted the feature/suggestion_for_unknown_command_and_unknown_option branch September 13, 2021 11:33
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.

2 participants