Merge commit 'e4fe941b11a55c5005630696e9b6d81c65f7bd04' into subtree-update_cg_gcc_2023-10-25

This commit is contained in:
Antoni Boucher
2023-10-26 17:42:02 -04:00
47 changed files with 2659 additions and 502 deletions

View File

@@ -0,0 +1,15 @@
use crate::utils::run_command_with_output;
fn get_args<'a>(args: &mut Vec<&'a dyn AsRef<std::ffi::OsStr>>, extra_args: &'a Vec<String>) {
for extra_arg in extra_args {
args.push(extra_arg);
}
}
pub fn run() -> Result<(), String> {
let mut args: Vec<&dyn AsRef<std::ffi::OsStr>> = vec![&"bash", &"test.sh"];
let extra_args = std::env::args().skip(2).collect::<Vec<_>>();
get_args(&mut args, &extra_args);
let current_dir = std::env::current_dir().map_err(|error| format!("`current_dir` failed: {:?}", error))?;
run_command_with_output(args.as_slice(), Some(&current_dir))
}