diff --git a/ethers-contract/ethers-contract-abigen/src/multi.rs b/ethers-contract/ethers-contract-abigen/src/multi.rs index 92e10fce..6dacc6dd 100644 --- a/ethers-contract/ethers-contract-abigen/src/multi.rs +++ b/ethers-contract/ethers-contract-abigen/src/multi.rs @@ -571,7 +571,7 @@ impl MultiBindingsInner { /// parses the active Cargo.toml to get what version of ethers we are using fn find_crate_version(&self) -> Result { - let cargo_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("Cargo.toml"); + let cargo_dir = std::env::current_dir()?.join("Cargo.toml"); let data = std::fs::read_to_string(cargo_dir)?; let toml = data.parse::()?;