From 7ee23660c56c602807801235d25f2ad6d0f8744f 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 --- CHANGELOG.md | 1 + bin/checkver.ps1 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d856f9e18..c223b1c060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Bug Fixes +- **checkver:** use Start-Job for manifest script to not to exit on break ([#32](https://github.com/ScoopInstaller/GithubActions/issues/32)) - **decompress:** Exclude '*.nsis' that may cause error ([#5294](https://github.com/ScoopInstaller/Scoop/issues/5294)) - **autoupdate:** Fix file hash extraction ([#5295](https://github.com/ScoopInstaller/Scoop/issues/5295)) - **getopt:** Stop split arguments in `getopt()` and ensure array by explicit arguments type ([#5326](https://github.com/ScoopInstaller/Scoop/issues/5326)) 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) {