Skip to content

Commit b2f7b89

Browse files
authored
Merge pull request #19803 from github/redsun82/rust-fix-qltest-lock-file
Rust: do not remove `Cargo.lock` file when running QL tests
2 parents 17cd58b + 71b9263 commit b2f7b89

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

rust/extractor/src/qltest.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use glob::glob;
44
use itertools::Itertools;
55
use std::ffi::OsStr;
66
use std::fs;
7-
use std::path::Path;
87
use std::process::Command;
98
use tracing::info;
109

@@ -60,18 +59,9 @@ fn set_sources(config: &mut Config) -> anyhow::Result<()> {
6059
Ok(())
6160
}
6261

63-
fn remove_file_if_exists(path: &Path) -> anyhow::Result<()> {
64-
match fs::remove_file(path) {
65-
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
66-
x => x,
67-
}
68-
.context(format!("removing file {}", path.display()))
69-
}
70-
7162
pub(crate) fn prepare(config: &mut Config) -> anyhow::Result<()> {
7263
dump_lib()?;
7364
set_sources(config)?;
74-
remove_file_if_exists(Path::new("Cargo.lock"))?;
7565
dump_cargo_manifest(&config.qltest_dependencies)?;
7666
if config.qltest_cargo_check {
7767
let status = Command::new("cargo")

0 commit comments

Comments
 (0)