Skip to content

Commit

Permalink
Attempt to catch msys install failure
Browse files Browse the repository at this point in the history
  • Loading branch information
derekwbrown committed Oct 13, 2022
1 parent baeb7b3 commit 8567d70
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions windows/helpers/install_msys.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ function Invoke-Msys2Shell($Arguments) {
FilePath = Join-Path $basepath msys2_shell.cmd
NoNewWindow = $true
Wait = $true
PassThru = $true
ArgumentList = "-defterm", "-no-start", "-c", "`"$Arguments`""
}
Write-Host "Invoking msys2 shell command:" $params.ArgumentList
Start-Process @params
$p = Start-Process @params
return $p.ExitCode
}
$isInstalled, $isCurrent = Get-InstallUpgradeStatus -Component "msys" -Keyname "version" -TargetValue $Version
if($isInstalled -and $isCurrent) {
Expand Down Expand Up @@ -50,9 +52,16 @@ Remove-Item $out
Remove-Item $msystar

## invoke the first-run shell
Invoke-Msys2Shell
$mshell = Invoke-Msys2Shell
Write-Host -ForegroundColor Yellow "Invoke-Msys2Shell return code $mshell"
if ( $mshell -ne "0") {
throw "Invoke MSYS returned $mshell"
}

ridk install 3
If ($lastExitCode -ne "0") {
throw "ridk install 3 returned $lastExitCode"
}
# Downgrade gcc and binutils due to https://github.com/golang/go/issues/46099
Get-RemoteFile -RemoteFile "https://s3.amazonaws.com/dd-agent-omnibus/mingw-w64-x86_64-gcc-10.2.0-11-any.pkg.tar.zst" -LocalFile "C:/mingw-w64-x86_64-gcc-10.2.0-11-any.pkg.tar.zst"
Get-RemoteFile -RemoteFile "https://s3.amazonaws.com/dd-agent-omnibus/mingw-w64-x86_64-gcc-libs-10.2.0-11-any.pkg.tar.zst" -LocalFile "C:/mingw-w64-x86_64-gcc-libs-10.2.0-11-any.pkg.tar.zst"
Expand Down

0 comments on commit 8567d70

Please sign in to comment.