Incorrect exit code when -quiet is used and a warning occurs.
Posted: 2014-10-19T01:45:12-07:00
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
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