You've already forked setup-dotnet
							
							
				mirror of
				https://github.com/actions/setup-dotnet.git
				synced 2025-11-04 17:06:35 +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:
		@ -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
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user