fix(function): build bundled bash tools without writing back to the source tree
PR #24 follow-up 1. The bundled-tools test called the writing generate_bash_declarations on the repo's assets/functions/tools/*.sh, so cargo test could rewrite tracked files. Split the build+export step into a pure build_bash_tool so the test never touches the source tree.
This commit is contained in:
2 files changed
+17
-7
No files matched your search
+2
-1
@@ -3389,7 +3389,8 @@ mod tests {
|
||||
continue;
|
||||
}
|
||||
let name = path.file_stem().unwrap().to_string_lossy().to_string();
|
||||
let declarations = Functions::generate_declarations(&path)
|
||||
let src = std::fs::read_to_string(&path).unwrap();
|
||||
let (_, declarations) = bash::build_bash_tool(&src, &name)
|
||||
.unwrap_or_else(|e| panic!("bundled tool '{name}' failed to parse: {e}"));
|
||||
assert!(
|
||||
!declarations.is_empty(),
|
||||
|
||||
Reference in new issue
Block a user