Open tisonkun opened 2 hours ago
It seems this code snippet will generate a Cargo.lock file that fails cargo publish as described in #135.
Cargo.lock
cargo publish
https://github.com/baoyachi/shadow-rs/blob/4358b4a0949fc50e50860ee625bc4dbfdc79166a/src/env.rs#L122-L130
@weihanglo suggested in https://github.com/rust-lang/cargo/issues/12195 that we may delete the Cargo.lock after build.
Currently work it around by add this line to the build.rs file:
build.rs
let _ = std::fs::remove_file(Path::new(env!("CARGO_MANIFEST_DIR")).join("Cargo.lock"));
Ref - https://github.com/tisonkun/morax/pull/4
It seems this code snippet will generate a
Cargo.lock
file that failscargo publish
as described in #135.https://github.com/baoyachi/shadow-rs/blob/4358b4a0949fc50e50860ee625bc4dbfdc79166a/src/env.rs#L122-L130
@weihanglo suggested in https://github.com/rust-lang/cargo/issues/12195 that we may delete the
Cargo.lock
after build.