Add some context on missing arguments #14

Merged
kernald merged 1 commit from missing-args-context into main 2024-11-05 09:31:48 +11:00
Showing only changes of commit 840db8e612 - Show all commits

View file

@ -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)?;