diff --git a/src/main.rs b/src/main.rs index fda3a241..3d66e5ea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,15 +58,16 @@ async fn try_main() -> Result<(), Box> { clap::parse(); // Initialize config - let raw_config = - Figment::new() - .merge( - Toml::file(Env::var("CONDUIT_CONFIG").ok_or( - "The CONDUIT_CONFIG env var needs to be set. Example: /etc/conduit.toml", - )?) - .nested(), - ) - .merge(Env::prefixed("CONDUIT_").global()); + let raw_config = Figment::new() + .merge( + Toml::file(Env::var("CONDUIT_CONFIG").ok_or( + "the `CONDUIT_CONFIG` environment variable must either be set to a \ + configuration file path or set to the empty string to force configuration \ + through environment variables", + )?) + .nested(), + ) + .merge(Env::prefixed("CONDUIT_").global()); let config = raw_config.extract::()?;