Skip to content

Commit 966e229

Browse files
committed
Rename toolcache directory instead of moving to tmp
This further enhances time savings seen in #213, down from a few minutes to seconds.
1 parent 267870a commit 966e229

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

__tests__/clear-toolcache.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ $dotnetPaths = @{
66

77
foreach ($srcPath in $dotnetPaths[$args[0]]) {
88
if (Test-Path $srcPath) {
9-
Write-Host "Move $srcPath path"
10-
$dstPath = Join-Path ([IO.Path]::GetTempPath()) ([IO.Path]::GetRandomFileName())
9+
$dstPath = "$srcPath-" + [IO.Path]::GetRandomFileName()
10+
Write-Host "Moving $srcPath to $dstPath"
1111
Move-Item -Path $srcPath -Destination $dstPath
1212
}
1313
}

0 commit comments

Comments
 (0)