convert exit always with exit status zero

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Convert should return an exit of 0 whcih in UNIX terms means success
when no error occured.

It should only return a exit of 1 for major errors.

For example a -crop of an image that missed the image will report that it missed as a warning, but this is NOT an error, so convert should still return a
exit of 0.

ASIDE: You command should not be using

Code: Select all

&& echo $? || echo $?
If you want it to always report the error status use

Code: Select all

; echo $?
Of course for Csh or Tcsh that should be

Code: Select all

; echo $status
.
:-)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply