Skip to content

README: name cmd.exe in the ConvertTo-PkArgumentString row's batch-file quoting - #120

Merged
HalRiveria merged 2 commits into
mainfrom
docs/argument-string-row-cmd
Dec 3, 2026
Merged

HalRiveria merged 2 commits into
mainfrom
docs/argument-string-row-cmd

Conversation

@HalRiveria-Bot

@HalRiveria-Bot HalRiveria-Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

What was wrong: the README's command-reference row for ConvertTo-PkArgumentString says a list in -Arguments is also quoted for cmd.exe "when the program is a .bat or .cmd". The kit does the same when the program is cmd.exe itself, as the README's Arguments section already says.

What changed: the row now reads "when the program is cmd.exe, a .bat or 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-PkProcessTree returned, 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 for cmd.exe as well as .bat and .cmd. Full harness: all 774 assertions pass on Windows PowerShell 5.1 and on PowerShell 7, with the test fix.

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.
@HalRiveria
HalRiveria merged commit 381a568 into main Dec 3, 2026
3 checks passed
@HalRiveria
HalRiveria deleted the docs/argument-string-row-cmd branch December 3, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants