File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ function detectPackageVersion(string $command): ?string
176176 try {
177177 $ output = trim (run ($ versionCmd ));
178178
179- if ($ output !== '' && preg_match ('/(\d+[\d.]+ )/ ' , $ output , $ matches )) {
179+ if ($ output !== '' && preg_match ('/(\d+[\d.]* )/ ' , $ output , $ matches )) {
180180 return $ matches [1 ];
181181 }
182182 } catch (RunException ) {
Original file line number Diff line number Diff line change 1313
1414 $ gmMinVersion = get ('requirements_graphicsmagick_min_version ' );
1515 $ imMinVersion = get ('requirements_imagemagick_min_version ' );
16+ $ gmVersionFail = false ;
1617
1718 // Try GraphicsMagick first (recommended)
1819 try {
2728
2829 return ;
2930 }
31+
32+ $ gmVersionFail = "GraphicsMagick $ actualVersion (required: >= $ gmMinVersion) " ;
3033 }
3134 } catch (RunException ) {
3235 // GraphicsMagick not available, try ImageMagick
5558 addRequirementRow (
5659 'Image processing ' ,
5760 REQUIREMENT_FAIL ,
58- "Neither GraphicsMagick (>= $ gmMinVersion) nor ImageMagick (>= $ imMinVersion) found "
61+ $ gmVersionFail !== false
62+ ? "$ gmVersionFail — ImageMagick (>= $ imMinVersion) not found "
63+ : "Neither GraphicsMagick (>= $ gmMinVersion) nor ImageMagick (>= $ imMinVersion) found "
5964 );
6065})->hidden ();
You can’t perform that action at this time.
0 commit comments