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 7ee2366
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
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 7ee2366

Please sign in to comment.