Przeglądaj źródła

Check jdk is correctly installed (#40550)

Sébastien Ros 4 lat temu
rodzic
commit
8b62081d4b
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      eng/scripts/InstallJdk.ps1

+ 2 - 1
eng/scripts/InstallJdk.ps1

@@ -19,13 +19,14 @@ Set-StrictMode -Version 1
 
 $repoRoot = Resolve-Path "$PSScriptRoot\..\.."
 $installDir = "$repoRoot\.tools\jdk\win-x64\"
+$javacExe = "$installDir\bin\javac.exe"
 $tempDir = "$repoRoot\obj"
 if (-not $JdkVersion) {
     $globalJson = Get-Content "$repoRoot\global.json" | ConvertFrom-Json
     $JdkVersion = $globalJson.tools.jdk
 }
 
-if (Test-Path $installDir) {
+if (Test-Path $javacExe) {
     if ($Force) {
         Remove-Item -Force -Recurse $installDir
     }