Skip to content

Commit 5e30417

Browse files
committed
chore: more verbose error message for failed path canonicalization
1 parent 14d2d79 commit 5e30417

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cli/signing.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ fn get_paths_for(format: Option<FileType>, file_path: &Path) -> anyhow::Result<V
2222
handler.paths_to_sign(file_path).map(|paths| {
2323
paths
2424
.iter()
25-
.map(|path| path.canonicalize().unwrap())
25+
.map(|path| {
26+
path.canonicalize()
27+
.map_err(|e| {
28+
anyhow!("failed to canonicalize path '{}': {}", path.display(), e)
29+
})
30+
.unwrap()
31+
})
2632
.collect()
2733
})
2834
} else {

0 commit comments

Comments
 (0)