Log the ClangSharpPInvokeGeneratorPath and ensure the script doesn't fail for missing tools (#497)

This commit is contained in:
Tanner Gooding 2021-06-09 14:29:36 -07:00 коммит произвёл GitHub
Родитель 8153f05671
Коммит 194c267561
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -46,16 +46,16 @@ function Install-DotNetTool
if ($Version -ne '')
{
$installed = & dotnet tool list -g | select-string "$Name\s+$Version"
if (!$installed.Length)
$installed = & dotnet tool list -g | select-string -Pattern "$Name\s+$Version" -Raw
if (($installed -eq $null) -or !$installed.Length)
{
& dotnet tool update --global $Name --version $Version
}
}
else
{
$installed = & dotnet tool list -g | select-string "$Name"
if (!$installed.Length)
$installed = & dotnet tool list -g | select-string -Pattern "$Name" -Raw
if (($installed -eq $null) -or !$installed.Length)
{
& dotnet tool update --global $Name
}

Просмотреть файл

@ -42,6 +42,7 @@ $partitionNames = Get-ChildItem $partitionsDir | Select-Object -ExpandProperty N
$stopwatch = [system.diagnostics.stopwatch]::StartNew()
Write-Output "`nProcessing each partition...using $throttleCount parallel script(s)"
Write-Output "ClangSharpPInvokeGenerator resolved to $((Get-Command ClangSharpPInvokeGenerator).Path)"
$errObj = new-object psobject
Add-Member -InputObject $errObj -MemberType NoteProperty -Name ErrorCode -Value 0