From 840db8e612425d21972a6beb7b200a2f0c73ce41 Mon Sep 17 00:00:00 2001 From: Marc Plano-Lesay Date: Tue, 5 Nov 2024 09:30:25 +1100 Subject: [PATCH] Add some context on missing arguments --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 617ce42..d99e718 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,8 @@ async fn main() -> Result<()> { let conf: Config = conf_extractor .merge(FileAdapter::wrap(Env::prefixed("IMMICH_TOOLS_"))) .merge(Serialized::defaults(&args)) - .extract()?; + .extract() + .wrap_err_with(|| "Invalid configuration or insufficient command line arguments")?; let client = get_client(&conf.server_url, &conf.api_key)?;