mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 00:13:02 +00:00
Ensure we don't overwrite an existing Cargo.lock when fetching an external git repo
This commit is contained in:
parent
f06831441b
commit
62bf33a9c6
@ -143,6 +143,7 @@ impl GitRepo {
|
||||
RelPath::PATCHES.to_path(dirs).join(format!("{}-lock.toml", self.patch_name));
|
||||
let target_lockfile = download_dir.join("Cargo.lock");
|
||||
if source_lockfile.exists() {
|
||||
assert!(!target_lockfile.exists());
|
||||
fs::copy(source_lockfile, target_lockfile).unwrap();
|
||||
} else {
|
||||
assert!(target_lockfile.exists());
|
||||
|
Loading…
Reference in New Issue
Block a user