Skip to content

Commit fda048b

Browse files
committed
Avoid dunce::canonincalize errors in tests
1 parent 0a2278f commit fda048b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

vhdl_lang/src/data/source.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,13 @@ impl FilePath {
604604
let path = match dunce::canonicalize(path) {
605605
Ok(path) => path,
606606
Err(err) => {
607-
eprintln!(
608-
"Could not create absolute path {}: {:?}",
609-
path.to_string_lossy(),
610-
err
611-
);
607+
if !cfg!(test) {
608+
eprintln!(
609+
"Could not create absolute path {}: {:?}",
610+
path.to_string_lossy(),
611+
err
612+
);
613+
}
612614
path.to_owned()
613615
}
614616
};

0 commit comments

Comments
 (0)