[vcpkg] Fix pwsh version detection for old versions to download a fresh copy. (#15355)

This commit is contained in:
Billy O'Neal 2020-12-28 19:35:21 -08:00 committed by GitHub
parent e2d3408547
commit 24290fb002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,8 +525,8 @@ Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50
auto output = std::move(rc.output);
if (!Strings::starts_with(output, "PowerShell "))
{
Checks::exit_with_message(
VCPKG_LINE_INFO, "Unexpected format of powershell-core version string: %s", output);
return {Strings::concat("Unexpected format of powershell-core version string: ", output),
expected_right_tag};
}
output.erase(0, 11);