1
0
Fork 0
mirror of synced 2026-06-05 14:28:19 +00:00
setup-dotnet/__tests__/clear-toolcache.ps1
2021-06-28 11:44:40 +03:00

13 lines
No EOL
432 B
PowerShell

$dotnetPaths = @{
Linux = "/usr/share/dotnet"
macOS = "$env:HOME/.dotnet"
Windows = "$env:ProgramFiles\dotnet", "$env:LocalAppData\Microsoft\dotnet"
}
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
}
}