Repository navigation
README: name cmd.exe in the ConvertTo-PkArgumentString row's batch-file quoting - #120
Merged
Merged
Conversation
…ograms a list is quoted for
The test that kills a live tree listed beside a disposed process counted leftover pings right after Stop-PkProcessTree returned. Ending a Job Object returns before Windows has finished tearing its processes down, so on a CI runner the ping was still listed once. It now waits up to 5 seconds for it to go, as the other kill tests do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What was wrong: the README's command-reference row for
ConvertTo-PkArgumentStringsays a list in-Argumentsis also quoted forcmd.exe"when the program is a.bator.cmd". The kit does the same when the program iscmd.exeitself, as the README's Arguments section already says.What changed: the row now reads "when the program is
cmd.exe, a.bator a.cmd".Also: a harness timing fix. This PR's first CI run failed one assertion under PowerShell 7: "Stop-PkProcessTree kills a live tree listed beside a disposed process (1 left, returned True)". The test was already on main and has nothing to do with the README change. It counted leftover pings right after
Stop-PkProcessTreereturned, but ending a Job Object returns before Windows has finished tearing its processes down, so the ping was still listed for a moment. The test now waits up to 5 seconds for it to go, as the other kill tests do, which still catches one that really survives.How it was tested: the README line was checked against
Resolve-PkArgumentList, which picks that quoting forcmd.exeas well as.batand.cmd. Full harness: all 774 assertions pass on Windows PowerShell 5.1 and on PowerShell 7, with the test fix.