fix flaky command_hooks_repair_path_when_enabled test (stdin EPIPE race) (#12209)

This commit is contained in:
Michael Neale
2026-09-18 18:09:17 +00:00
committed by GitHub
parent 8fd84be23b
commit 86d6eb99f3
+5 -1
View File
@@ -2184,7 +2184,11 @@ mod tests {
)
.unwrap();
let helper = login_bin.join("hook-visible-tool");
std::fs::write(&helper, "#!/bin/sh\nprintf 'hook-visible-tool-ran'\n").unwrap();
std::fs::write(
&helper,
"#!/bin/sh\ncat > /dev/null\nprintf 'hook-visible-tool-ran'\n",
)
.unwrap();
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;