Skip to content

fix: terminate output with a newline, drop the empty copyright line - #126

Open
BKPepe wants to merge 2 commits into
librespeed:masterfrom
BKPepe:fix/output-termination
Open

fix: terminate output with a newline, drop the empty copyright line#126
BKPepe wants to merge 2 commits into
librespeed:masterfrom
BKPepe:fix/output-termination

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 9, 2026

Copy link
Copy Markdown

Two output nits, one commit each.

--json and --csv end without a trailing newline — --json writes the
marshalled bytes as-is, --csv explicitly trims it. The shell prompt lands
on the same line as the result, and appending one --csv run to another
glues the last field of the first into the first field of the second:

$ { librespeed-cli --csv; librespeed-cli --csv; } | python3 -c "import csv,sys; print([len(r) for r in csv.reader(sys.stdin)])"
[17]     # one 17-column row instead of two 9-column rows

And --version prints librespeed.org Copyright (C) — no holder, no year,
unchanged since the first commit.

After: exactly one \n on both. jq already accepted the JSON; the change
just makes the output line-oriented like every other CLI.

BKPepe added 2 commits August 9, 2026 10:11
Neither ended with one: --json wrote the marshalled bytes as-is and --csv
explicitly trimmed the trailing newline. The shell prompt lands on the same
line as the result, and --csv-header already ends with a newline, so the two
CSV modes could not be concatenated into a valid file.
"librespeed.org	Copyright (C)" has named no holder and no year since the
first commit. It says nothing that the two lines above it do not.
Copilot AI lite review requested due to automatic review settings August 9, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants