chore: gen-key subcommand should show canonical paths

This commit is contained in:
Karolin Varner
2024-08-15 22:12:02 +02:00
parent 8808ed5dbc
commit fd0f35b279

View File

@@ -316,12 +316,14 @@ impl CliArgs {
let mut problems = vec![];
if !force && pkf.is_file() {
problems.push(format!(
"public-key file {pkf:?} exist, refusing to overwrite it"
"public-key file {:?} exists, refusing to overwrite",
std::fs::canonicalize(&pkf)?,
));
}
if !force && skf.is_file() {
problems.push(format!(
"secret-key file {skf:?} exist, refusing to overwrite it"
"secret-key file {:?} exists, refusing to overwrite",
std::fs::canonicalize(&skf)?,
));
}
if !problems.is_empty() {