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:
js6pak 2024-07-21 00:41:11 +02:00
parent 6bd8b7f777
commit b4737b42ef
No known key found for this signature in database
GPG Key ID: 3E3CD91EB1AAFB06
1 changed files with 2 additions and 2 deletions

View File

@ -6,8 +6,8 @@ $dotnetPaths = @{
foreach ($srcPath in $dotnetPaths[$args[0]]) {
if (Test-Path $srcPath) {
Write-Host "Move $srcPath path"
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName())
$dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
Write-Host "Moving $srcPath to $dstPath"
Move-Item -Path $srcPath -Destination $dstPath
}
}