Page 1 of 1

non-zero exit code with -version

Posted: 2014-06-01T08:52:26-07:00
by localhost
After updating ImageMagick to 6.8.9-2, the -version flag is now returning a non-zero exit code and isn't consistent across all of the tools.

Code: Select all

#convert -version
Version: ImageMagick 6.8.9-2 Q16 x86_64 2014-06-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jbig jng jpeg png tiff webp x xml zlib
# echo $?
1

Code: Select all

# compare -version
Version: ImageMagick 6.8.9-2 Q16 x86_64 2014-06-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jbig jng jpeg png tiff webp x xml zlib
# echo $?
2

Code: Select all

# display -version
Version: ImageMagick 6.8.9-2 Q16 x86_64 2014-06-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib fontconfig freetype jbig jng jpeg png tiff webp x xml zlib
# echo $?
1

Re: non-zero exit code with -version

Posted: 2014-06-02T03:55:35-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.8.9-3 Beta available by sometime tomorrow. Thanks.

Re: non-zero exit code with -version

Posted: 2016-05-16T07:01:56-07:00
by kayn
I see the same issue in verison ImageMagick 7.0.1-3 Q16 x86_64 2016-05-09


Code: Select all

[root@example]# convert -version;echo $?
Version: ImageMagick 7.0.1-3 Q16 x86_64 2016-05-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP 
Delegates (built-in): bzlib cairo djvu fftw fontconfig fpx freetype gslib jng jpeg lcms ltdl lzma pangocairo png ps tiff webp wmf x xml zlib
1
[root@example]# identify >/dev/null;echo $?
1
# but when I specify null: as output files:
[root@example]# convert -version null: null: >/dev/null;echo $?
0

Re: non-zero exit code with -version

Posted: 2016-05-16T07:33:23-07:00
by snibgo
The v7 bug has been reported. See viewtopic.php?f=3&t=29671