Skip to content

Commit 8b62081

Browse files
authored
Check jdk is correctly installed (#40550)
1 parent 5a0e56e commit 8b62081

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eng/scripts/InstallJdk.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ Set-StrictMode -Version 1
1919

2020
$repoRoot = Resolve-Path "$PSScriptRoot\..\.."
2121
$installDir = "$repoRoot\.tools\jdk\win-x64\"
22+
$javacExe = "$installDir\bin\javac.exe"
2223
$tempDir = "$repoRoot\obj"
2324
if (-not $JdkVersion) {
2425
$globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
2526
$JdkVersion = $globalJson.tools.jdk
2627
}
2728

28-
if (Test-Path $installDir) {
29+
if (Test-Path $javacExe) {
2930
if ($Force) {
3031
Remove-Item -Force -Recurse $installDir
3132
}

0 commit comments

Comments
 (0)