This commit is contained in:
Nikita Bykov
2020-10-19 20:28:34 +03:00
6 changed files with 71 additions and 42 deletions

View File

@@ -49,6 +49,13 @@ Function Install-VisualStudio
}
else
{
$setupErrorLogPath = "$env:TEMP\dd_setup_*_errors.log"
if (Test-Path -Path $setupErrorLogPath)
{
$logErrors = Get-Content -Path $setupErrorLogPath -Raw
Write-Host "$logErrors"
}
Write-Host "Non zero exit code returned by the installation process : $exitCode"
exit $exitCode
}

View File

@@ -3,8 +3,14 @@
## Desc: Install GitHub CLI
################################################################################
Choco-Install -PackageName gh
Write-Host "Get the latest gh version..."
$Name = "gh_windows_amd64.msi"
$Assets = (Invoke-RestMethod -Uri "https://api.github.com/repos/cli/cli/releases/latest").assets
$DownloadUrl = ($Assets.browser_download_url -match "windows_amd64.msi") | Select-Object -First 1
Install-Binary -Url $DownloadUrl -Name $Name
Add-MachinePathItem "C:\Program Files (x86)\GitHub CLI"
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "GitHub CLI"
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "GitHub CLI"