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

backend/flags: avoiding setting values that aren't specified #80

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

rogpeppe
Copy link
Contributor

In #67, the isFlagSet logic was changed so that it always returned
true, so even unmentioned flags would override previously set values.

This PR fixes that issue (fixes #79) and also changes the flag tests
to be somewhat more flexible and test this specific issue.

I haven't made any wider fixes because the concept of using command-line
flags as a backend is fundamentally broken in a way that cannot be fixed
(see #63), so will probably be removed in a future major version release
of confita.

In #67, the `isFlagSet` logic was changed so that it always returned
true, so even unmentioned flags would override previously set values.

This PR fixes that issue (fixes #79) and also changes the flag tests
to be somewhat more flexible and test this specific issue.

I haven't made any wider fixes because the concept of using command-line
flags as a backend is fundamentally broken in a way that cannot be fixed
(see #63), so will probably be removed in a future major version release
of confita.
@rogpeppe rogpeppe requested review from yaziine and tealeg November 28, 2019 16:56
Copy link
Contributor

@tealeg tealeg left a comment

Choose a reason for hiding this comment

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

👍

@yaziine yaziine removed their request for review January 6, 2020 10:23
Copy link

@christophe-dufour christophe-dufour left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

I'm still having hard time understanding why we need such a layer of abstraction but let's not open that box now.

@sixstone-qq sixstone-qq merged commit 3cdb63e into master Jun 23, 2020
@sixstone-qq sixstone-qq deleted the rog-005-fix-flags branch June 23, 2020 08:53
philippgille pushed a commit that referenced this pull request Mar 22, 2021
backend/flags: avoiding setting values that aren't specified
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.

Impossible to get a value from env
4 participants