Fix Windows PowerShell --help/version checks in Windows CLI integration workflow#38115
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Fix Windows PowerShell --help check in Windows CLI integration
Fix Windows PowerShell Jun 9, 2026
--help/version checks in Windows CLI integration workflow
Copilot created this pull request from a session on behalf of
pelikhan
June 9, 2026 12:56
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows CLI integration workflow to make the legacy powershell (powershell.exe / PS 5.x) --help and version checks more reliable by avoiding Start-Process exit-code flakiness in CI.
Changes:
- Replaced
Start-Process -PassThru -NoNewWindowwithSystem.Diagnostics.ProcessStartInfo+[System.Diagnostics.Process]::Start(...)for the legacypowershell--helpstep. - Replaced
Start-Process -PassThru -NoNewWindowwithSystem.Diagnostics.ProcessStartInfo+[System.Diagnostics.Process]::Start(...)for the legacypowershellversionstep. - Kept the existing
WaitForExit(30000)timeout + kill-on-timeout + non-zero-exit enforcement behavior.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/windows-cli-integration.yml | Updates legacy Windows PowerShell process launching for --help/version to reduce CI false negatives from unreliable exit-code handling. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 2
Comment on lines
+126
to
+130
| $psi = New-Object System.Diagnostics.ProcessStartInfo | ||
| $psi.FileName = $env:BINARY | ||
| $psi.Arguments = "--help" | ||
| $psi.UseShellExecute = $false | ||
| $proc = [System.Diagnostics.Process]::Start($psi) |
Comment on lines
+141
to
+145
| $psi = New-Object System.Diagnostics.ProcessStartInfo | ||
| $psi.FileName = $env:BINARY | ||
| $psi.Arguments = "version" | ||
| $psi.UseShellExecute = $false | ||
| $proc = [System.Diagnostics.Process]::Start($psi) |
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.
The Windows integration job was failing in the legacy
powershellstep even whengh-aw.exe --helpprinted successfully. The failure came from unreliable exit-code handling in that execution path, which caused false negatives and skipped downstream checks.Root cause
Start-Process ... -PassThru -NoNewWindowinshell: powershelloccasionally produced an empty/invalidExitCodein CI for short-lived commands.Workflow execution change (legacy PowerShell only)
Start-Processusage in the twoshell: powershellsteps (--help,version) withSystem.Diagnostics.ProcessStartInfo+[System.Diagnostics.Process]::Start(...).WaitForExit(30000)+ kill on timeout).Scope
.github/workflows/windows-cli-integration.ymlwas updated.pwshandcmdchecks remain unchanged.