Show a better error message when executing "magick convert" when the project is build with exclusion of the deprecated methods.

This commit is contained in:
Dirk Lemstra
2025-04-05 15:11:09 +02:00
parent 6c19acd378
commit afad44e2c4
+10 -1
View File
@@ -120,7 +120,16 @@ static int MagickMain(int argc,char **argv)
ssize_t
i;
#if defined(MAGICKCORE_EXCLUDE_DEPRECATED)
if ((argc > 1) &&
(LocaleNCompare("magick",argv[0],sizeof("magick")-1) == 0) &&
(LocaleNCompare("convert",argv[1],sizeof("convert")-1) == 0))
{
(void) fprintf(stderr,"Use \"magick\" instead of the deprecated command \"magick convert\".\n");
exit(1);
}
#endif
MagickCoreGenesis(*argv,MagickTrue);
MagickWandGenesis();
exception=AcquireExceptionInfo();