Skip to content

Commit

Permalink
Make the config collation independent of a specified config file
Browse files Browse the repository at this point in the history
As there are several potential sources of configuration, the collation
mode is relevant whether a invocation-specific configuration file is
specified, or not. This has the cheery consequence of sidestepping
the issue described in clap-rs/clap#5020.
  • Loading branch information
Xophmeister committed Aug 14, 2023
1 parent 849f64e commit dff2152
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions topiary-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,7 @@ pub struct GlobalArgs {
display_order = 101,
env = "TOPIARY_CONFIG_COLLATION",
global = true,
hide_env_values = true,
// FIXME There appears to be a bug with clap: If this argument is specified via its
// environment variable, then the required argument (--configuration) *only* works if it is
// also specified via its environment variable. If you use the CLI argument, it complains
// that the argument doesn't exist. This behaviour only occurs with subcommands, but that
// is exactly our use case, here. (See clap-rs/clap#5020)
requires = "configuration"
hide_env_values = true
)]
pub configuration_collation: Option<configuration::CollationMode>,
}
Expand Down

0 comments on commit dff2152

Please sign in to comment.