From 9d75e5f17819733a0451d565f246206077bbe779 Mon Sep 17 00:00:00 2001 From: Will Smith <44074786+Will-Smith11@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:23:10 -0500 Subject: [PATCH] Fix: use cwd manifest (#1869) * fix(abigen): make compatible with older rust versions * Update ethers-contract/ethers-contract-abigen/src/multi.rs Co-authored-by: Matthias Seitz * fix: linting * fix(abigen): use active cargo.toml over crate cargo.toml Co-authored-by: Matthias Seitz --- ethers-contract/ethers-contract-abigen/src/multi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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::()?;