Skip to content

Commit

Permalink
Panic in case rewriting dependency paths as absoluteyields a non-UTF8…
Browse files Browse the repository at this point in the history
… sequence
  • Loading branch information
hdoordt committed Nov 5, 2024
1 parent c5b5bcd commit 1fc81f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ fn rewrite_dep_paths_as_absolute<'a, P: AsRef<std::path::Path>>(
.join(path)
.canonicalize()
.unwrap()
.to_string_lossy()
.to_str()
.expect("Canonicalized absolute path contained non-UTF-8 segments.")
.to_string()
})
}
Expand Down

0 comments on commit 1fc81f0

Please sign in to comment.