Capture subprocess results separately from diagnostics

This commit is contained in:
2026-11-26 04:02:51 +00:00
parent bb84094385
commit a9705a6b56
6 changed files with 235 additions and 5 deletions

View File

@@ -604,6 +604,13 @@ func TestSubprocessHelper(t *testing.T) {
}
switch mode {
case "binary-result":
_, _ = os.Stdout.Write([]byte{0, 255, '\n', 128})
os.Exit(0)
case "result-wait":
_, _ = os.Stdout.WriteString("result")
time.Sleep(10 * time.Second)
os.Exit(0)
case "success":
_, _ = os.Stdout.WriteString(os.Getenv("SUBPROCESS_HELPER_STDOUT") + "\n")
_, _ = os.Stderr.WriteString(os.Getenv("SUBPROCESS_HELPER_STDERR") + "\n")