Skip to content

Commit

Permalink
Merge pull request #569 from mwallner/Task-GH564
Browse files Browse the repository at this point in the history
(GH-564) ensure ExitCode is populated
  • Loading branch information
flcdrg authored Jun 29, 2024
2 parents af0236a + 8402349 commit a86b4c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Boxstarter.Chocolatey/invoke-chocolatey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ function Invoke-Chocolatey($chocoArgs) {

$p = Start-Process @pargs

$dummy = $p.Handle # Cache the handle => https://github.com/PowerShell/PowerShell/issues/20400
Wait-Process -Id $p.Id
Write-Verbose "choco process handle: $dummy"

Write-BoxstarterMessage "BoxstarterWrapper::Run => $($p.ExitCode)" -Verbose
[System.Environment]::ExitCode = $p.ExitCode
Expand Down

0 comments on commit a86b4c3

Please sign in to comment.