Skip to content

Commit 1c7098b

Browse files
authored
Fix Windows PowerShell --help/version checks in Windows CLI integration workflow (#38115)
1 parent fcac3fc commit 1c7098b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/windows-cli-integration.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ jobs:
123123
- name: "[powershell] --help with timeout"
124124
shell: powershell
125125
run: |
126-
$proc = Start-Process -FilePath $env:BINARY -ArgumentList "--help" -PassThru -NoNewWindow
126+
$psi = New-Object System.Diagnostics.ProcessStartInfo
127+
$psi.FileName = $env:BINARY
128+
$psi.Arguments = "--help"
129+
$psi.UseShellExecute = $false
130+
$proc = [System.Diagnostics.Process]::Start($psi)
127131
if (-Not $proc.WaitForExit(30000)) {
128132
$proc.Kill()
129133
throw "TIMEOUT: --help hung for 30s in Windows PowerShell"
@@ -134,7 +138,11 @@ jobs:
134138
- name: "[powershell] version with timeout"
135139
shell: powershell
136140
run: |
137-
$proc = Start-Process -FilePath $env:BINARY -ArgumentList "version" -PassThru -NoNewWindow
141+
$psi = New-Object System.Diagnostics.ProcessStartInfo
142+
$psi.FileName = $env:BINARY
143+
$psi.Arguments = "version"
144+
$psi.UseShellExecute = $false
145+
$proc = [System.Diagnostics.Process]::Start($psi)
138146
if (-Not $proc.WaitForExit(30000)) {
139147
$proc.Kill()
140148
throw "TIMEOUT: version hung for 30s in Windows PowerShell"

0 commit comments

Comments
 (0)