Fix CLI stdout count report + add regression test
Devin Review caught that `--out -` discarded the sample count, so the stderr summary always said 'wrote 0 sample(s)' even when bytes were streamed. Capture the return value like the file-output branch does, and add a regression test that exercises the stdout path. Co-Authored-By: adrian kuman firmansah <adriancuman@gmail.com>
This commit is contained in:
@@ -101,9 +101,8 @@ def main(argv: list[str] | None = None) -> int:
|
||||
)
|
||||
|
||||
out: Path = args.out
|
||||
count = 0
|
||||
if str(out) == "-":
|
||||
_write_stream(sys.stdout.buffer, filters)
|
||||
count = _write_stream(sys.stdout.buffer, filters)
|
||||
else:
|
||||
out.parent.mkdir(parents=True, exist_ok=True)
|
||||
with out.open("wb") as fh:
|
||||
|
||||
Reference in New Issue
Block a user