postgres.git / summary / log / commit / refs

commit    4c9239d08a87b8e4a5f9731c29993f9976aa824f
Author:   Andrew Dunstan <andrew@dunslane.net>
Date:     Fri Apr 17 18:55:55 2020 +0000
First released in: 13.0, 9.5.22, 9.6.18, 10.13, 11.8, 12.3

    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.


src/tools/msvc/VSObjectFactory.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index 07be39f2bd8..f8f6b300eba 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -150,7 +150,7 @@ sub DetermineVisualStudioVersion $? >> 8 == 0 or croak "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); } [parent: 3cdf2421a299]