non-zero exit code with -version

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
localhost
Posts: 1
Joined: 2014-06-01T08:42:59-07:00
Authentication code: 6789

non-zero exit code with -version

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: non-zero exit code with -version

Post 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.
kayn
Posts: 2
Joined: 2016-05-16T06:58:19-07:00
Authentication code: 1151

Re: non-zero exit code with -version

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: non-zero exit code with -version

Post by snibgo »

The v7 bug has been reported. See viewtopic.php?f=3&t=29671
snibgo's IM pages: im.snibgo.com
Post Reply