Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions rust/extractor/src/qltest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use glob::glob;
use itertools::Itertools;
use std::ffi::OsStr;
use std::fs;
use std::path::Path;
use std::process::Command;
use tracing::info;

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

fn remove_file_if_exists(path: &Path) -> anyhow::Result<()> {
match fs::remove_file(path) {
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(()),
x => x,
}
.context(format!("removing file {}", path.display()))
}

pub(crate) fn prepare(config: &mut Config) -> anyhow::Result<()> {
dump_lib()?;
set_sources(config)?;
remove_file_if_exists(Path::new("Cargo.lock"))?;
dump_cargo_manifest(&config.qltest_dependencies)?;
if config.qltest_cargo_check {
let status = Command::new("cargo")
Expand Down