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

Add clarifications about passThroughOptions handling of unknown options to docs and comments #1942

Closed

Conversation

aweebit
Copy link
Contributor

@aweebit aweebit commented Aug 5, 2023

Problem

#1936

Solution

What caused my confusion turned out to be desired behavior.

This PR includes clarifications that could help avoid confusion in the future.

ChangeLog

Fixed

  • extended documentation about .passThroughOptions() by a missing mention of unknown option handling

@shadowspawn
Copy link
Collaborator

I suspect this was driven in part by confusion with interaction with .allowUnknownOption() which is a second-class setting.

On balance, I don't think the comment in the README is helpful for the majority of readers, and the comment in the code was unclear to me and I know what the code does. Given how many other issues and PRs you have open at the moment, I am just closing this one.

Related comments about .allowUnknownOption() :

@shadowspawn shadowspawn closed this Aug 7, 2023
aweebit added a commit to aweebit/commander.js that referenced this pull request Aug 11, 2023
- Store onlyKnownOptionsSoFar value instead of computing
- Removed passThroughOptions comment considered unclear (see tj#1942)

(cherry picked from commit d7e2399)
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