Skip to content

Commit

Permalink
fix(checkver) use Start-Job for manifest script to not to exit on break
Browse files Browse the repository at this point in the history
Invoke-Command will exit the parent process if a manifest script issues
a break command.  Use Start-Job to resolve this.

Fixes ScoopInstaller/GithubActions#32
  • Loading branch information
sedlund committed Feb 27, 2023
1 parent 8acfeee commit d828c69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/checkver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ while ($in_progress -gt 0) {
$page = (Get-Encoding($wc)).GetString($ev.SourceEventArgs.Result)
}
if ($script) {
$page = Invoke-Command ([scriptblock]::Create($script -join "`r`n"))
$page = Start-Job ([scriptblock]::Create($script -join "`r`n"))
Wait-Job $page | Out-Null
}

if ($jsonpath) {
Expand Down

0 comments on commit d828c69

Please sign in to comment.