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) {