mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 23:50:19 +00:00
Retry and back off delete directory
This commit is contained in:
parent
8909fd9b2f
commit
202c2d68fc
24
.github/workflows/workflow.yml
vendored
24
.github/workflows/workflow.yml
vendored
@ -89,8 +89,12 @@ jobs:
|
|||||||
- name: Clear tool cache (Windows)
|
- name: Clear tool cache (Windows)
|
||||||
if: runner.os == 'windows'
|
if: runner.os == 'windows'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
$SleepTime = 0
|
||||||
Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue
|
while ((Test-Path $env:LocalAppData\Microsoft\dotnet) -and ($SleepTime -lt 120)) {
|
||||||
|
Start-Sleep $SleepTime
|
||||||
|
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
$SleepTime += 5
|
||||||
|
}
|
||||||
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
|
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
|
||||||
- name: Setup dotnet '2.0'
|
- name: Setup dotnet '2.0'
|
||||||
uses: ./
|
uses: ./
|
||||||
@ -109,8 +113,12 @@ jobs:
|
|||||||
- name: Clear tool cache (Windows)
|
- name: Clear tool cache (Windows)
|
||||||
if: runner.os == 'windows'
|
if: runner.os == 'windows'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
$SleepTime = 0
|
||||||
Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue
|
while ((Test-Path $env:LocalAppData\Microsoft\dotnet) -and ($SleepTime -lt 120)) {
|
||||||
|
Start-Sleep $SleepTime
|
||||||
|
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
$SleepTime += 5
|
||||||
|
}
|
||||||
- name: Setup dotnet 2.0.x
|
- name: Setup dotnet 2.0.x
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -128,8 +136,12 @@ jobs:
|
|||||||
- name: Clear tool cache (Windows)
|
- name: Clear tool cache (Windows)
|
||||||
if: runner.os == 'windows'
|
if: runner.os == 'windows'
|
||||||
run: |
|
run: |
|
||||||
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
$SleepTime = 0
|
||||||
Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue
|
while ((Test-Path $env:LocalAppData\Microsoft\dotnet) -and ($SleepTime -lt 120)) {
|
||||||
|
Start-Sleep $SleepTime
|
||||||
|
Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
$SleepTime += 5
|
||||||
|
}
|
||||||
- name: Setup dotnet 2.0.*
|
- name: Setup dotnet 2.0.*
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user