mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-17 23:36:44 +00:00
[Windows] Invoke Move-Item and Rename-Item with retry after Extract-7Zip (#4598)
This commit is contained in:
committed by
GitHub
parent
af645a7b5e
commit
978ab79564
@@ -92,7 +92,9 @@ function Install-JavaJDK {
|
||||
|
||||
# Complete the installation by extarcting Java binaries to toolcache and creating the complete file
|
||||
Extract-7Zip -Path $archivePath -DestinationPath $javaVersionPath
|
||||
Get-ChildItem -Path $javaVersionPath | Rename-Item -NewName $javaArchPath
|
||||
Invoke-SBWithRetry -Command {
|
||||
Get-ChildItem -Path $javaVersionPath | Rename-Item -NewName $javaArchPath -ErrorAction Stop
|
||||
}
|
||||
New-Item -ItemType File -Path $javaVersionPath -Name "$Architecture.complete" | Out-Null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user