Use absolute path to cargo.lock to fix build on nix
This commit is contained in:
parent
00f1b640d7
commit
470cf6b343
2
build.rs
2
build.rs
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue