From d26729ef12e126cb15ce65d15bdef7fcf31c4e60 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Fri, 25 Oct 2024 15:07:08 -0700 Subject: [PATCH] Use FullName in InstallJdk script (#58618) --- eng/scripts/InstallJdk.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/scripts/InstallJdk.ps1 b/eng/scripts/InstallJdk.ps1 index 027d5e0c9b2e..0dc30f7ce2f7 100644 --- a/eng/scripts/InstallJdk.ps1 +++ b/eng/scripts/InstallJdk.ps1 @@ -46,7 +46,7 @@ Expand-Archive "$tempDir/jdk.zip" -d "$tempDir/jdk/" Write-Host "Expanded JDK to $tempDir" Write-Host "Installing JDK to $installDir" # The name of the file directory within the zip is based on the version, but may contain a +N for build number. -Move-Item "$tempDir/jdk/$(Get-ChildItem -Path "$tempDir/jdk" | Select-Object -First 1)/*" $installDir +Move-Item "$(Get-ChildItem -Path "$tempDir/jdk" | Select-Object -First 1 -ExpandProperty FullName)/*" $installDir Write-Host "Done installing JDK to $installDir" if ($env:TF_BUILD) {