You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Show-FailureLogs to include vcpkg build failure logs (#5776)
* Show-FailureLogs to include vcpkg build failure logs
* Add comment
* Add proper array syntax
* Use proper syntax to create an array even if there's only a single element
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
---------
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ben Broderick Phillips <ben@benbp.net>
# vcpkg logs do reference build log paths after "See logs for more information:". Sometimes there are multiple files to see.
33
+
# And should there be a C++ build error, for example - that is where the error message would be.
34
+
# So, we parse known logs (contained in vcpkgLogFileNames), and see if more logs are mentioned there. If there are extra logs,
35
+
# we add them to the end of the list that we're iterating over, so that the format is the same, and this code gets reused
36
+
# (i.e. formatting, Log file name header, try-catch, and so on).
37
+
if ($i-lt$vcpkgLogFileNames.Length)
38
+
{
39
+
$rawContents=Get-Content$logFile-Raw
40
+
$regexMatches=Select-String"See logs for more information\:\s*(\r|\n|\r\n|\n\r)(\s+(?<logFilePath>\S*)\s*(\r|\n|\r\n|\n\r))+"-input $rawContents-AllMatches
0 commit comments