get the autobuilders to work after introducing test-cases

This commit is contained in:
Erik Krogh Kristensen 2022-05-31 10:25:48 +00:00
Родитель eb0340dcb6
Коммит 047b14e310
2 изменённых файлов: 4 добавлений и 18 удалений

Просмотреть файл

@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
.split('\n')
{
if let Some(stripped) = line.strip_prefix("include:") {
cmd.arg("--also-match").arg(absolutelyfy(stripped));
cmd.arg("--also-match=".to_owned() + stripped);
} else if let Some(stripped) = line.strip_prefix("exclude:") {
cmd.arg("--exclude").arg(stripped);
cmd.arg("--exclude=".to_owned() + stripped);
}
}
let exit = &cmd.spawn()?.wait()?;
std::process::exit(exit.code().unwrap_or(1))
}
// converts the relative path `stripped` to an absolute path by prepending the working directory
fn absolutelyfy(stripped: &str) -> String {
let pwd = env::current_dir().unwrap();
pwd.join(stripped).into_os_string().into_string().unwrap()
}

Просмотреть файл

@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
.split('\n')
{
if let Some(stripped) = line.strip_prefix("include:") {
cmd.arg("--also-match").arg(absolutelyfy(stripped));
cmd.arg("--also-match=".to_owned() + stripped);
} else if let Some(stripped) = line.strip_prefix("exclude:") {
cmd.arg("--exclude").arg(stripped);
cmd.arg("--exclude=".to_owned() + stripped);
}
}
let exit = &cmd.spawn()?.wait()?;
std::process::exit(exit.code().unwrap_or(1))
}
// converts the relative path `stripped` to an absolute path by prepending the working directory
fn absolutelyfy(stripped: &str) -> String {
let pwd = env::current_dir().unwrap();
pwd.join(stripped).into_os_string().into_string().unwrap()
}