Skip to content

Commit 59bfffe

Browse files
authored
Fix the working directory path canonicalization (#204)
* Update the commit hash of resolc compiler tests * Fix an issue with file errors in substrate export-chainspec * Update the resolc compiler tests * Fix the working directory canonicalization
1 parent 380ea69 commit 59bfffe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/config/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use alloy::{
1616
primitives::{B256, FixedBytes, U256},
1717
signers::local::PrivateKeySigner,
1818
};
19+
use anyhow::Context as _;
1920
use clap::{Parser, ValueEnum, ValueHint};
2021
use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier};
2122
use semver::Version;
@@ -1079,7 +1080,10 @@ impl FromStr for WorkingDirectoryConfiguration {
10791080
fn from_str(s: &str) -> Result<Self, Self::Err> {
10801081
match s {
10811082
"" => Ok(Default::default()),
1082-
_ => Ok(Self::Path(PathBuf::from(s))),
1083+
_ => PathBuf::from(s)
1084+
.canonicalize()
1085+
.context("Failed to canonicalize the working directory path")
1086+
.map(Self::Path),
10831087
}
10841088
}
10851089
}

0 commit comments

Comments
 (0)