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
Incorrect exit code when -quiet is used and a warning occurs.
-
- Posts: 467
- Joined: 2008-12-21T11:51:10-07:00
Re: Incorrect exit code when -quiet is used and a warning oc
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.