fix(abigen): use lib for parsing paths correctly in windows
This commit is contained in:
parent
8d95f3bf33
commit
be468bcf32
|
@ -1161,6 +1161,7 @@ dependencies = [
|
|||
"Inflector",
|
||||
"anyhow",
|
||||
"cfg-if 1.0.0",
|
||||
"dunce",
|
||||
"ethers-core",
|
||||
"getrandom 0.2.3",
|
||||
"hex",
|
||||
|
|
|
@ -24,6 +24,7 @@ hex = { version = "0.4.2", default-features = false, features = ["std"] }
|
|||
reqwest = { version = "0.11.3", default-features = false, features = ["blocking"] , optional = true }
|
||||
once_cell = "1.8.0"
|
||||
cfg-if = "1.0.0"
|
||||
dunce = "1.0.2"
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
# NOTE: this enables wasm compatibility for getrandom indirectly
|
||||
|
|
|
@ -229,7 +229,7 @@ fn get_local_contract(path: impl AsRef<str>) -> Result<String> {
|
|||
let root = Path::new(&manifest_path);
|
||||
let mut contract_path = root.join(&path);
|
||||
if !contract_path.exists() {
|
||||
contract_path = path.canonicalize()?;
|
||||
contract_path = dunce::canonicalize(&path)?;
|
||||
}
|
||||
if !contract_path.exists() {
|
||||
anyhow::bail!("Unable to find local contract \"{}\"", path.display())
|
||||
|
|
Loading…
Reference in New Issue