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

Fix option suggestion when running a subcommand #87

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

ntwcklng
Copy link
Collaborator

We iterate through the options from the main command, even when you run a subcommand and we process.exit() too early because we can't find an option for your subcommand in your main command. To prevent that, we now check if the subcommand is defined.

This fixes #86.

Copy link

@jstcki jstcki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm! Thanks for the quick fix 👍

@leo leo merged commit fcddca4 into leo:master Apr 25, 2017
@leo
Copy link
Owner

leo commented Apr 25, 2017

wow, thanks!

@leo
Copy link
Owner

leo commented Apr 25, 2017

Released in 2.6.1!

ntwcklng added a commit to ntwcklng/args that referenced this pull request Apr 25, 2017
@ntwcklng ntwcklng deleted the fix-sub-option branch April 26, 2017 14:00
ntwcklng added a commit that referenced this pull request Apr 28, 2017
#82)

* refactor to multiple files

* include lib/ for npm

* refactor methods - one per file

* entry point to lib/index

* assign public methods

* add main param

* style changes

* implement fix #87
leo pushed a commit that referenced this pull request May 1, 2022
#82)

* refactor to multiple files

* include lib/ for npm

* refactor methods - one per file

* entry point to lib/index

* assign public methods

* add main param

* style changes

* implement fix #87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subcommand options broken in v2.6
3 participants