I don't understand. Part of the idea of the exit code is to be able to determine if there was an error or not. But here the suggestion is to make the utility return the same error code in the case of a success and an error. In both cases, whether the images are different or an error was thrown, return 1. But that does not tell the user or the calling utility if an error was thrown or if the two images are just different. Consequently, there is no way to know if the result can be "trusted". ie: did the utility complete properly and the images are indeed different, or was there an error in the process and the utility crashed (ex: file does not exist, file access errors, etc). Consequently, a non-zero exit code ends up not meaning anything at all.magick wrote: We'll keep the exiting exit status for all ImageMagick utilities except the compare utility. For it, we will return the same exit status as grep. That is if the images are similar and no errors, return 0. If the images are dissimilar and no errors, return 1. If an error occurs, return 1.
At the very least, I would expect a different exit code on error vs on difference of images (ex: 0 if images are the same, 1 if images are different, and something >1 on error depending on the error).