Skip to content

Allow boolean options to get value from fallback instead of defaultProvider (Was: Negatable options interact badly with default providers) #754

@adamsmd

Description

@adamsmd

I think I have discovered a problem with the design of negatable options. Specifically, there is a problem when there is a default provider that dynamically calculates the default (e.g., it gets its values from a configuration file or environment variable).

For example consider a negatable option foo. If the configuration file sets the default to false, then --foo sets the option to true and --no-foo sets the option to false. However, if the configuration file sets the default to true, then these reverse and --foo sets the option to false while --no-foo sets the option to true.

I think this would a confusing behavior for the end user and that --foo and --no-foo should be consistent in what they set the option to regardless of what the default provider computes dynamically.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions