Skip to content

Commit

Permalink
Avoid dunce::canonincalize errors in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraigher committed Nov 13, 2023
1 parent 0a2278f commit fda048b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions vhdl_lang/src/data/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,13 @@ impl FilePath {
let path = match dunce::canonicalize(path) {
Ok(path) => path,
Err(err) => {
eprintln!(
"Could not create absolute path {}: {:?}",
path.to_string_lossy(),
err
);
if !cfg!(test) {
eprintln!(
"Could not create absolute path {}: {:?}",
path.to_string_lossy(),
err
);
}
path.to_owned()
}
};
Expand Down

0 comments on commit fda048b

Please sign in to comment.