Skip to content

Commit

Permalink
hack for wingetcreate not exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy-s committed Oct 31, 2024
1 parent 9af2074 commit 9b9a093
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions winget/Publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ if ($Submit)

$wingetCreateArgs += @($identifier)

$process = Start-Process -FilePath $wingetCreate -ArgumentList $wingetCreateArgs -PassThru -Wait -NoNewWindow
$process = Start-Process -FilePath $wingetCreate -ArgumentList $wingetCreateArgs -PassThru -NoNewWindow

if ($process.ExitCode -ne 0)
# HACK to workaround wingetcreate not exiting properly
if (!$process.WaitForExit(60000))
{
Write-Host "wingetcreate reached timeout... assuming success..."
$process.Kill()
}
elseif ($process.ExitCode -ne 0)
{
Write-Host "wingetcreate failed with exit code: $($process.ExitCode)"
exit 1
Expand Down

0 comments on commit 9b9a093

Please sign in to comment.