After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 683380 - rsvg-convert mingles error messages with output
rsvg-convert mingles error messages with output
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
2.36.x
Other All
: Normal trivial
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-05 06:43 UTC by Ture Pålsson
Modified: 2012-09-05 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ture Pålsson 2012-09-05 06:43:24 UTC
rsvg-convert sends error messages about bad command-line options to stdout. This means that if you do

  rsvg-convert --some-switch-that-does-not-exist in.svg >out.png

you get no visible error messages, and an out.png that contains text!

I suggest this be changed so that error messages go to stderr. Might be as easy as the following, but I am not familiar with all the g_*() stuff, so there may be subtleties in there of which I am not aware.

--- rsvg-convert.c.~1~  2012-02-06 20:44:12.000000000 +0100
+++ rsvg-convert.c      2012-09-05 08:19:17.000000000 +0200
@@ -61,7 +61,7 @@ static void
 display_error (GError * err)
 {
     if (err) {
-        g_print ("%s\n", err->message);
+        g_printerr ("%s\n", err->message);
         g_error_free (err);
     }
 }
Comment 1 Christian Persch 2012-09-05 10:32:45 UTC
Fixed on master.