mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 11:31:07 +07:00
Move toolcache folder
This commit is contained in:
parent
f720d14d91
commit
5070486392
@ -1,13 +1,13 @@
|
|||||||
$dotnetPaths = @{
|
$dotnetPaths = @{
|
||||||
Linux = @("/usr/share/dotnet")
|
Linux = "/usr/share/dotnet"
|
||||||
macOS = @("$env:HOME/.dotnet")
|
macOS = "$env:HOME/.dotnet"
|
||||||
Windows = @("$env:ProgramFiles\dotnet/*",
|
Windows = "$env:ProgramFiles\dotnet", "$env:LocalAppData\Microsoft\dotnet"
|
||||||
"$env:LocalAppData\Microsoft\dotnet/*")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($path in $dotnetPaths[$args[0]]) {
|
foreach ($srcPath in $dotnetPaths[$args[0]]) {
|
||||||
if (Test-Path $path) {
|
if (Test-Path $srcPath) {
|
||||||
Write-Host "Clear $path path"
|
Write-Host "Move $srcPath path"
|
||||||
Remove-Item $path -Recurse -Force
|
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName())
|
||||||
|
Move-Item -Path $srcPath -Destination $dstPath
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user