Running rsvg-convert without arguments should print a helpful message
rsvg-convert
works like a filter when given no arguments:
cat foo.svg | rsvg-convert > output.png
However, if one just runs rsvg-convert
with no arguments, it sits there waiting for input from stdin without giving the user a clue of what to do. Instead, it should print something to stderr like Reading SVG data from standard input; press Ctrl-C and run "rsvg-convert --help" for usage instructions.
Maybe do that only if stderr is actually a terminal. I think the atty
crate is the right one to use these days to determine that, but double-check it.
It would be good to have some tests for this, for the various combinations of having arguments (including --output
) or not, and input/output going to terminals or not.