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

🐛 pre-process all CLI flags #1967

Merged
merged 1 commit into from
Sep 28, 2023
Merged

🐛 pre-process all CLI flags #1967

merged 1 commit into from
Sep 28, 2023

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Sep 28, 2023

We were getting errors for commands that had not been pre-processed, like login --token.

This PR changes the CLI pre-processor and makes it traverse the root command to find all possible flags across any command and add them to the pre-processing flags. This avoid the warning/error.

Addresses parts of: #1965
namely: ! CLI pre-processing encountered an issue error="unknown shorthand flag: 't' in -t"

We were getting errors for commands that had not been pre-processed,
like `login --token`.

This PR changes the CLI pre-processor and makes it traverse the root
command to find all possible flags across any command and add them to
the pre-processing flags. This avoid the warning/error.

Signed-off-by: Dominik Richter <[email protected]>
@arlimus arlimus force-pushed the dom/cli-preprocessing branch from 106e213 to eb1c811 Compare September 28, 2023 08:21
Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@chris-rock chris-rock merged commit 44dc134 into main Sep 28, 2023
10 checks passed
@chris-rock chris-rock deleted the dom/cli-preprocessing branch September 28, 2023 08:28
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants