Skip to content

Commit 047b14e

Browse files
committed
get the autobuilders to work after introducing test-cases
1 parent eb0340d commit 047b14e

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

ql/autobuilder/src/main.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
2929
.split('\n')
3030
{
3131
if let Some(stripped) = line.strip_prefix("include:") {
32-
cmd.arg("--also-match").arg(absolutelyfy(stripped));
32+
cmd.arg("--also-match=".to_owned() + stripped);
3333
} else if let Some(stripped) = line.strip_prefix("exclude:") {
34-
cmd.arg("--exclude").arg(stripped);
34+
cmd.arg("--exclude=".to_owned() + stripped);
3535
}
3636
}
3737
let exit = &cmd.spawn()?.wait()?;
3838
std::process::exit(exit.code().unwrap_or(1))
3939
}
40-
41-
// converts the relative path `stripped` to an absolute path by prepending the working directory
42-
fn absolutelyfy(stripped: &str) -> String {
43-
let pwd = env::current_dir().unwrap();
44-
45-
pwd.join(stripped).into_os_string().into_string().unwrap()
46-
}

ruby/autobuilder/src/main.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
2929
.split('\n')
3030
{
3131
if let Some(stripped) = line.strip_prefix("include:") {
32-
cmd.arg("--also-match").arg(absolutelyfy(stripped));
32+
cmd.arg("--also-match=".to_owned() + stripped);
3333
} else if let Some(stripped) = line.strip_prefix("exclude:") {
34-
cmd.arg("--exclude").arg(stripped);
34+
cmd.arg("--exclude=".to_owned() + stripped);
3535
}
3636
}
3737
let exit = &cmd.spawn()?.wait()?;
3838
std::process::exit(exit.code().unwrap_or(1))
3939
}
40-
41-
// converts the relative path `stripped` to an absolute path by prepending the working directory
42-
fn absolutelyfy(stripped: &str) -> String {
43-
let pwd = env::current_dir().unwrap();
44-
45-
pwd.join(stripped).into_os_string().into_string().unwrap()
46-
}

0 commit comments

Comments
 (0)