1
0
mirror of https://github.com/actions/setup-dotnet.git synced 2025-03-01 01:59:05 +07:00
setup-dotnet/__tests__/clear-toolcache.ps1

13 lines
432 B
PowerShell
Raw Normal View History

2021-02-04 15:14:09 +03:00
$dotnetPaths = @{
2021-06-28 11:44:40 +03:00
Linux = "/usr/share/dotnet"
macOS = "$env:HOME/.dotnet"
Windows = "$env:ProgramFiles\dotnet", "$env:LocalAppData\Microsoft\dotnet"
2021-02-03 15:13:32 +03:00
}
2021-06-28 11:44:40 +03:00
foreach ($srcPath in $dotnetPaths[$args[0]]) {
if (Test-Path $srcPath) {
Write-Host "Move $srcPath path"
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName())
Move-Item -Path $srcPath -Destination $dstPath
2021-02-03 15:13:32 +03:00
}
2021-02-04 14:24:06 +03:00
}