mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-26 05:13:05 +07:00
Rename toolcache directory instead of moving to tmp
This further enhances time savings seen in #213, down from a few minutes to seconds.
This commit is contained in:
parent
6bd8b7f777
commit
b4737b42ef
@ -6,8 +6,8 @@ $dotnetPaths = @{
|
|||||||
|
|
||||||
foreach ($srcPath in $dotnetPaths[$args[0]]) {
|
foreach ($srcPath in $dotnetPaths[$args[0]]) {
|
||||||
if (Test-Path $srcPath) {
|
if (Test-Path $srcPath) {
|
||||||
Write-Host "Move $srcPath path"
|
$dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
|
||||||
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName())
|
Write-Host "Moving $srcPath to $dstPath"
|
||||||
Move-Item -Path $srcPath -Destination $dstPath
|
Move-Item -Path $srcPath -Destination $dstPath
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user