Add some context on missing arguments

This commit is contained in:
Marc Plano-Lesay 2024-11-05 09:30:25 +11:00
parent d37ab08728
commit 840db8e612
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF

View file

@ -44,7 +44,8 @@ async fn main() -> Result<()> {
let conf: Config = conf_extractor let conf: Config = conf_extractor
.merge(FileAdapter::wrap(Env::prefixed("IMMICH_TOOLS_"))) .merge(FileAdapter::wrap(Env::prefixed("IMMICH_TOOLS_")))
.merge(Serialized::defaults(&args)) .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)?; let client = get_client(&conf.server_url, &conf.api_key)?;