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 <matthias.seitz@outlook.de> * fix: linting * fix(abigen): use active cargo.toml over crate cargo.toml Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
parent
f5da30d23b
commit
9d75e5f178
|
@ -571,7 +571,7 @@ impl MultiBindingsInner {
|
||||||
|
|
||||||
/// parses the active Cargo.toml to get what version of ethers we are using
|
/// parses the active Cargo.toml to get what version of ethers we are using
|
||||||
fn find_crate_version(&self) -> Result<String> {
|
fn find_crate_version(&self) -> Result<String> {
|
||||||
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 data = std::fs::read_to_string(cargo_dir)?;
|
||||||
let toml = data.parse::<Value>()?;
|
let toml = data.parse::<Value>()?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue