From dff215267430f461b31deaf254e1db1770a5e8a7 Mon Sep 17 00:00:00 2001 From: Christopher Harrison Date: Tue, 8 Aug 2023 17:00:25 +0100 Subject: [PATCH] Make the config collation independent of a specified config file 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. --- topiary-cli/src/cli.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/topiary-cli/src/cli.rs b/topiary-cli/src/cli.rs index e83516ce..a4600ecf 100644 --- a/topiary-cli/src/cli.rs +++ b/topiary-cli/src/cli.rs @@ -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, }