Add more error details

This commit is contained in:
Andrey Golovizin 2021-06-29 23:06:16 +02:00
parent 6fdf002608
commit f48b500f64

View file

@ -114,7 +114,7 @@ fn get_config(opts: &ConfigOpts) -> Result<(), anyhow::Error> {
.locations
.iter()
.find(|location| location.name == opts.location)
.ok_or_else(|| anyhow::anyhow!("no such location"))?;
.ok_or_else(|| anyhow::anyhow!("no such location: {}", opts.location))?;
debug!("location = {:?}", &location);
let keys = generage_keys()?;
debug!("keys = {:?}", &keys);