Skip to content

Fix arg.allowed and flag.allowed to allow setting without required or default #372

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

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

DannyBen
Copy link
Member

@DannyBen DannyBen commented Apr 7, 2023

cc #368

This is a revert of #370 plus a fix to allow the whitelist to be optional and without a default value.

@DannyBen DannyBen changed the title Fix arg.allowed and flag.allowed to allow setting without 'required' or 'default' Fix arg.allowed and flag.allowed to allow setting without required or default Apr 7, 2023
Copy link
Member Author

@DannyBen DannyBen Apr 7, 2023

Choose a reason for hiding this comment

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

This change modifies the whitelist filter to only validate the contents of the variable if it is not empty.
In case the flag/arg are set to require: true, we will never reach this code since it will be blocked earlier.

@DannyBen DannyBen merged commit 349bbb7 into master Apr 7, 2023
@DannyBen DannyBen deleted the fix/allowed branch April 7, 2023 09:44
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.

1 participant