Skip Java detection on restore if not building (#10368)

This commit is contained in:
Alessio Franceschelli 2019-05-20 16:57:55 +01:00 committed by Nate McMaster
parent 630af4d319
commit e92b4800df
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ $MSBuildArguments += "/p:_RunSign=$Sign"
$MSBuildArguments += "/p:TargetArchitecture=$Architecture"
$MSBuildArguments += "/p:TargetOsName=win"
if (($All -or $BuildJava) -and -not $NoBuildJava) {
if ($RunBuild -and ($All -or $BuildJava) -and -not $NoBuildJava) {
$foundJdk = $false
$javac = Get-Command javac -ErrorAction Ignore -CommandType Application
$localJdkPath = "$PSScriptRoot\.tools\jdk\win-x64\"