feat: v1.1.3, fix runts script file issue

This commit is contained in:
2025-01-24 22:19:42 +08:00
parent ae8266db07
commit d581809696
3 changed files with 10 additions and 3 deletions

View File

@@ -8,7 +8,14 @@ pub fn do_run_script(ts_args: &RunScriptArgs) {
failure_and_exit!("Must assign a script file name");
}
debugging!("Run ts args: {:?}", ts_args.arguments);
let script_file = &ts_args.arguments[ts_args.arguments.len() - 1];
let script_file = (|| {
for arg in &ts_args.arguments {
if !arg.starts_with("--") {
return arg;
}
}
&ts_args.arguments[ts_args.arguments.len() - 1]
})();
verify::verify_script(script_file, is_env_on("RUNTS_SKIP_VERIFY"));
let mut cmd = Command::new("/usr/bin/env");