mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
get the autobuilders to work after introducing test-cases
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user