diff --git a/hive-subagent-mcp/src/session.rs b/hive-subagent-mcp/src/session.rs index 8466f8a0..d8d09ed8 100644 --- a/hive-subagent-mcp/src/session.rs +++ b/hive-subagent-mcp/src/session.rs @@ -3578,18 +3578,14 @@ mod tests { /// EOF, so `RunningClaude::wait` would not return until the orphaned /// sleep expired, and the turn would look like it was still running. fn fake_claude(dir: &Path, log: &Path) -> PathBuf { - use std::os::unix::fs::PermissionsExt as _; let script = dir.join("fake-claude"); - std::fs::write( + write_executable( &script, - format!( + &format!( "#!/bin/sh\necho turn >> '{}'\ntrap 'exit 0' INT\nsleep 30 >/dev/null 2>&1 &\nwait\n", log.display() ), - ) - .expect("write the fake claude"); - std::fs::set_permissions(&script, std::fs::Permissions::from_mode(0o755)) - .expect("make the fake claude executable"); + ); script }