Skip to content

Commit

Permalink
Add a force
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmundt committed Mar 4, 2025
1 parent 7f8419d commit dac551f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,14 @@ jobs:
# Main installation loop
for PKG in $PACKAGES; do
if [[ "${{matrix.TARGET}}" == win ]]; then
# Use PowerShell to run conda install with a timeout
powershell -Command "
$process = Start-Process conda -ArgumentList 'install', '-q', '-y', '$PKG' -NoNewWindow -PassThru;
$timeout = 30;
$startTime = Get-Date;
while (-not $process.HasExited) {
Start-Sleep -Seconds 1;
if ((Get-Date) - $startTime -gt [TimeSpan]::FromSeconds($timeout)) {
Stop-Process -Id $process.Id;
Stop-Process -Id $process.Id -Force;
Write-Host 'WARNING: $PKG installation timed out';
break;
}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,14 @@ jobs:
# Main installation loop
for PKG in $PACKAGES; do
if [[ "${{matrix.TARGET}}" == win ]]; then
# Use PowerShell to run conda install with a timeout
powershell -Command "
$process = Start-Process conda -ArgumentList 'install', '-q', '-y', '$PKG' -NoNewWindow -PassThru;
$timeout = 30;
$startTime = Get-Date;
while (-not $process.HasExited) {
Start-Sleep -Seconds 1;
if ((Get-Date) - $startTime -gt [TimeSpan]::FromSeconds($timeout)) {
Stop-Process -Id $process.Id;
Stop-Process -Id $process.Id -Force;
Write-Host 'WARNING: $PKG installation timed out';
break;
}
Expand Down

0 comments on commit dac551f

Please sign in to comment.