diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-13 20:52:54 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-13 20:52:54 +0200 |
| commit | 1b34e1f2501b8def0a0fb4eae28bf6c19a8adde2 (patch) | |
| tree | 4898ab4ff4a7dd4ea102726a845e3935c39ee320 /integrationtests/commandutils.go | |
| parent | 07d654f76e1002b6ac18a43aab3c64797dcd2a32 (diff) | |
Fix serverless output draining regressions
Diffstat (limited to 'integrationtests/commandutils.go')
| -rw-r--r-- | integrationtests/commandutils.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/integrationtests/commandutils.go b/integrationtests/commandutils.go index 6dfe069..86feee2 100644 --- a/integrationtests/commandutils.go +++ b/integrationtests/commandutils.go @@ -2,6 +2,7 @@ package integrationtests import ( "bufio" + "bytes" "context" "fmt" "io" @@ -36,7 +37,9 @@ func runCommand(ctx context.Context, t *testing.T, stdoutFile, cmdStr string, cmd := exec.CommandContext(ctx, cmdStr, args...) out, err := cmd.CombinedOutput() t.Log("Done running command!", err) - _, _ = fd.Write(out) + if _, copyErr := io.Copy(fd, bytes.NewReader(out)); copyErr != nil { + return exitCodeFromError(err), copyErr + } return exitCodeFromError(err), err } |
