Today — termlens render --svg failing.snap writes to stdout, and that is the only destination. Measured on 0.10.1: render() in crates/termlens-cli/src/main.rs ends in print(&out) with no path handling.
Why it is worth fixing — the documented use is producing an image for a bug report or a CI artifact, and every caller therefore writes > file.svg. That works in a shell and is awkward everywhere else: a Makefile loop, a PowerShell step on the Windows leg, or the report action, which renders several files in a row. It is also the one place where a redirect can silently produce an empty file when the command fails, because the shell truncates before the process runs.
Fix — add --out PATH to render in crates/termlens-cli/src/main.rs: write there instead of stdout, create nothing if the render fails, and keep stdout as the default so existing invocations are unchanged. Document it in RENDER_USAGE and crates/termlens-cli/README.md.
Done when
A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need git commit -s
(DCO). Happy to review a draft PR early.
Today —
termlens render --svg failing.snapwrites to stdout, and that is the only destination. Measured on 0.10.1:render()incrates/termlens-cli/src/main.rsends inprint(&out)with no path handling.Why it is worth fixing — the documented use is producing an image for a bug report or a CI artifact, and every caller therefore writes
> file.svg. That works in a shell and is awkward everywhere else: aMakefileloop, a PowerShell step on the Windows leg, or thereportaction, which renders several files in a row. It is also the one place where a redirect can silently produce an empty file when the command fails, because the shell truncates before the process runs.Fix — add
--out PATHtorenderincrates/termlens-cli/src/main.rs: write there instead of stdout, create nothing if the render fails, and keep stdout as the default so existing invocations are unchanged. Document it inRENDER_USAGEandcrates/termlens-cli/README.md.Done when
termlens render --svg --out x.svg a.snapwrites the same bytes stdout would have.crates/termlens-cli/tests/cli.rscovers both.A good first contribution: one file, no architecture decisions. Start with
CONTRIBUTING.md
— §1 lists every gate you can run locally, and §3 asks that a change land
with a test. Commits are Conventional Commits and need
git commit -s(DCO). Happy to review a draft PR early.