fix(checkver) use Start-Job for manifest script to not to exit on break #5407
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Change the method
checkver
runs manifest scripts to useStart-Job
instead ofInvoke-Command
. When usingInvoke-Command
if the script calls abreak
the parent process will exit.See: Do not use break outside of a loop, switch, or trap
Motivation and Context
Currently autoupdating is broken on all Scoop buckets that have a manifest that runs a
break
in the autoupdate script portion. Once one manifest is run that has issued a break the Github action will exit and the rest of the bucket will fail to update.This change starts the manifest script as a separate job allowing the parent process to continue after the manifest script exits, and letting the github action to finish updating the buckets.
How Has This Been Tested?
I ran the change on my copy of the current (3579b11f99c692f6b68c1ce5119b8e5d6db9f2bb) Extras repo. I have attached the output of the update here. Compare with the current log of Excavator ran during the same period:
See where it fails on
librewolf
. That manifest issues abreak
command. My local bucket updated 84 manifests.Checklist:
develop
branch.