1
0
mirror of https://github.com/actions/setup-dotnet.git synced 2026-02-18 07:21:19 +01:00
Files
setup-dotnet/__tests__/clear-toolcache.ps1
Vladimir Safonkin c0d7255256 Rework cleanup script
2021-02-04 15:14:09 +03:00

13 lines
353 B
PowerShell

$dotnetPaths = @{
Linux = @("/usr/share/dotnet")
macOS = @("$env:HOME/.dotnet")
Windows = @("$env:ProgramFiles\dotnet/*",
"$env:LocalAppData\Microsoft\dotnet/*")
}
foreach ($path in $dotnetPaths[$args[0]]) {
if (Test-Path $path) {
Write-Host "Clear $path path"
Remove-Item $path -Recurse -Force
}
}