Use absolute path to cargo.lock to fix build on nix

This commit is contained in:
Sam W 2021-11-18 02:18:25 +00:00
parent 00f1b640d7
commit 470cf6b343
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
fn main() -> Result<(), Box<dyn std::error::Error>> {
let s = std::fs::read_to_string("./cargo.lock")?;
let s = std::fs::read_to_string(std::env::var("CARGO_MANIFEST_DIR")? + "/cargo.lock")?;
let lock = s.parse::<toml::Value>().unwrap();
let mut reqwest_ver: Option<String> = None;
for p in lock.as_table().unwrap()["package"].as_array().unwrap() {