swupd-client icon indicating copy to clipboard operation
swupd-client copied to clipboard

Messages about overriding content and/or version URLs on STDOUT spoil JSON output

Open bwarden opened this issue 2 years ago • 0 comments

If we override the content or version URLs using -u, -c, or -v, we print out a message on STDOUT warning about it: https://github.com/clearlinux/swupd-client/blob/ec4a272115476db8c07a650ef009548d801bcad9/src/swupd_lib/globals.c#L553-L572

In most cases, this is probably fine. But if we've been given -j for JSON output, we really should only be outputting valid JSON strings. We should probably move these (and any other) warnings to STDERR.

This will likely affect test cases, too.

bwarden avatar May 16 '23 23:05 bwarden