1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-05 09:19:17 +03:00

Use a slightly more liberal regex to detect Visual Studio version

Apparently in some language versions of Visual Studio nmake outputs some
material after the version number and before the end of the line. This
has been seen in Chinese versions. Therefore, we no longer demand that
the version string comes at the end of a line.

Per complaint from Cuiping Lin.

Backpatch to all live branches.
This commit is contained in:
Andrew Dunstan 2020-04-17 14:55:55 -04:00
parent 3cdf2421a2
commit 4c9239d08a

View File

@ -150,7 +150,7 @@ sub DetermineVisualStudioVersion
$? >> 8 == 0 $? >> 8 == 0
or croak or croak
"Unable to determine Visual Studio version: The nmake command wasn't found."; "Unable to determine Visual Studio version: The nmake command wasn't found.";
if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m) if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?/)
{ {
return _GetVisualStudioVersion($1, $2); return _GetVisualStudioVersion($1, $2);
} }