Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(git): avoid executable fixture race

Steven Enamakel5084a596b8ba
diff --git a/crates/openhuman-core/src/tools/impl/filesystem/git_operations_config_tests.rs b/crates/openhuman-core/src/tools/impl/filesystem/git_operations_config_tests.rs
index e821abd433..15a9d58c58 100644
--- a/crates/openhuman-core/src/tools/impl/filesystem/git_operations_config_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/filesystem/git_operations_config_tests.rs
@@ -47,7 +47,10 @@ fn plant_fsmonitor_hook(dir: &std::path::Path) -> std::path::PathBuf {
use std::os::unix::fs::PermissionsExt;
std::fs::set_permissions(&hook, std::fs::Permissions::from_mode(0o755)).unwrap();
- std::process::Command::new(&hook).status().unwrap();
+ // Running a newly-written file directly can race the overlay filesystem in
+ // CI with ETXTBSY. Invoke the same script through the shell instead; git
+ // executes the configured hook through its interpreter as well.
+ std::process::Command::new("sh").arg(&hook).status().unwrap();
assert!(marker.exists(), "the planted hook does not run at all");
std::fs::remove_file(&marker).unwrap();