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 WithIgnoreUndefined option to config parse #1839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zackattack01
Copy link
Contributor

Currently, if an unknown option is found in our launcher.flags the parser will stop parsing and return an error which is not checked/logged. This adds an option to the parser to prevent this behavior and continue parsing, discarding the unknown flag

@directionless
Copy link
Contributor

@RebeccaMahany Would this have eliminated the need for github.com/spf13/pflag ?

@RebeccaMahany
Copy link
Contributor

RebeccaMahany commented Aug 26, 2024

@directionless -- I don't think so. Unless the behavior has changed -- the last time I looked into it when I ultimately added pflag instead, WithIgnoreUndefined worked for flags supplied via config file, but would still break for us with undefined command-line args.

Separately, I am not sure if this PR will address #1513 -- older launcher installations without this option set will still run into this issue.

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.

3 participants