Page 1 of 1

Incorrect exit code when -quiet is used and a warning occurs.

Posted: 2014-10-19T01:45:12-07:00
by broucaries
When running the following command:

identify -quiet -ping -format "%w %h\n" erroneous.jpg; echo $?

I get the following output

10 10
1

Without the -quiet option, I get an additional line of output:

identify: Corrupt JPEG data: 2 extraneous bytes before marker 0xdb `/home/boutil/debian/pkg-ruby-extras/ruby-mini-magick/spec/files/erroneous.jpg' @ warning/jpeg.c/JPEGWarningHandler/352.

According to the documentation for the quiet option, the warning should
be ignored.
With 8:6.8.8.9-3, the exit code was 0.

This change of behavior breaks a wrapper for ImageMagick, packaged as
ruby-mini-magick. Commands on erroneous images now are causing errors.

Erronous file is under https://bugs.debian.org/cgi-bin/bugrepo ... bug=763686

Re: Incorrect exit code when -quiet is used and a warning oc

Posted: 2014-10-19T06:44:02-07:00
by magick
Perhaps a transient bug. With ImageMagick 6.8.9-9 Beta, both identify commands (with and without -quiet) return a status of 0 as expected.