mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Merge pull request #213 from al-cheb/al-cheb/move-dotnet-dir
Move toolcache folder
This commit is contained in:
commit
5306333434
@ -1,13 +1,13 @@
|
||||
$dotnetPaths = @{
|
||||
Linux = @("/usr/share/dotnet")
|
||||
macOS = @("$env:HOME/.dotnet")
|
||||
Windows = @("$env:ProgramFiles\dotnet/*",
|
||||
"$env:LocalAppData\Microsoft\dotnet/*")
|
||||
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
|
||||
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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user