Harden handling when getting the installed dotnet cli version by JamesWTruher · Pull Request #1367 · PowerShell/PSScriptAnalyzer
dotnet --version can now emit a list of installed sdks as output *and* an error if the global.json file points to a version of the sdk which is *not* installed. However, the format of the new list with --version has a couple of spaces at the beginning of the line, so we need to be resilient against that.