Skip to content

Refuse an Invoke-PkProcessWithTimeout -TimeoutMs below 1 - #50

Merged
HalRiveria-Bot merged 1 commit into
mainfrom
fix/timeoutms-below-one
Nov 17, 2026
Merged

HalRiveria-Bot merged 1 commit into
mainfrom
fix/timeoutms-below-one

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

What was wrong: Invoke-PkProcessWithTimeout didn't check -TimeoutMs. With 0 or less it started the program, killed it on the first pass and threw "did not exit within 0ms - killed". Elsewhere in the kit (-TimeoutSeconds) 0 means no limit, so a 0 here is easy to pass by mistake.

What changed: a -TimeoutMs below 1 is refused before anything starts, with a message naming the parameter and the value, like the kit's other limits. 0 isn't taken as "no limit", so a forgotten value can't hang a script forever. The help says "at least 1".

Tested: new harness assertions for -TimeoutMs 0 and -5. Before the fix both started cmd.exe and threw "did not exit within 0ms/-5ms - killed" on 5.1 and 7. Now both throw -TimeoutMs must be at least 1 (got N). Full harness passes on Windows PowerShell 5.1 and PowerShell 7.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria-Bot
HalRiveria-Bot merged commit 3c12d2a into main Nov 17, 2026
2 checks passed
@HalRiveria-Bot
HalRiveria-Bot deleted the fix/timeoutms-below-one branch November 17, 2026 03:29
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