From d828c6943f8396dcf0c4fba5ba61e37c01a1cdd0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Feb 2023 15:08:32 +0700 Subject: [PATCH] fix(checkver) use Start-Job for manifest script to not to exit on break Invoke-Command will exit the parent process if a manifest script issues a break command. Use Start-Job to resolve this. Fixes https://github.com/ScoopInstaller/GithubActions/issues/32 --- bin/checkver.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index e740208d99..39c99e953b 100644 --- a/bin/checkver.ps1 +++ b/bin/checkver.ps1 @@ -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) {