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(cli): Update start.command.ts to allowUnknownOption #2240

Merged
merged 1 commit into from Aug 16, 2023

Conversation

zackdotcomputer
Copy link
Contributor

Commander requires an explicit call to allowUnknownOption to allow and not error on options it does not recognize. This causes an issue with this functionality because any user-defined flags are blocked at the command level.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

This is a proposal for a fix to restore the behavior of forwarding flags on to the nest start command. Currently, commander fails any calls with --xxxx flags it doesn't recognize, so that functionality doesn't work.

Issue Number: #1844

What is the new behavior?

This adds the allowUnknownOption behavior so commander will no longer fail calls with --xxxx flags it does not recognize.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Refer to initial PR on this work: #1847

Commander requires an explicit call to `allowUnknownOption` to allow and not error on options it does not recognize. This causes an issue with [this functionality](nestjs#1847) because any user-defined flags are blocked at the command level.
@kamilmysliwiec kamilmysliwiec merged commit 671e5d4 into nestjs:master Aug 16, 2023
1 check passed
@kamilmysliwiec
Copy link
Member

lgtm

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

2 participants