Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7588142

Browse files
committed
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.
1 parent 213e2b7 commit 7588142

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/msvc/VSObjectFactory.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ sub DetermineVisualStudioVersion
152152
$? >> 8 == 0
153153
or croak
154154
"Unable to determine Visual Studio version: The nmake command wasn't found.";
155-
if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m)
155+
if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?/)
156156
{
157157
return _GetVisualStudioVersion($1, $2);
158158
}

0 commit comments

Comments
 (0)