зеркало из https://github.com/github/codeql.git
get the autobuilders to work after introducing test-cases
This commit is contained in:
Родитель
eb0340dcb6
Коммит
047b14e310
|
@ -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()
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче