Test report and trees stdout write failures (closes #30) #74

Merged
clawbot merged 1 commits from issue-30-stdout-write-errors into next 2026-10-03 18:01:27 +02:00
1 Commits
Author SHA1 Message Date
clawbot 64725e0b89 Test report and trees stdout write failures (closes #30)
check / check (push) Successful in 56s
report and trees already checked every stdout write and the final
flush. run now takes the stdout it hands to them, so tests pass a
closed file or a failing writer instead of swapping os.Stdout: a
closed stdout exits 1 with a one-line diagnostic, and the writer's
error reaches the caller.

README "Error handling" now states the two cases that never reach
sfdupes as a failed write: a pipe reader that exits early ends the
process with SIGPIPE, as with cat; and stdout closed with >&- is
replaced by /dev/null by the Go runtime before main runs, so the run
succeeds.

Model: opus-5-5
2026-10-03 15:14:42 +00:00