diff --git a/flexera/release.ps1 b/flexera/release.ps1 index 9c4e185900..d0eaf780b0 100644 --- a/flexera/release.ps1 +++ b/flexera/release.ps1 @@ -170,7 +170,10 @@ if ($SkipBuild) { Get-ChildItem (Join-Path $Root 'build\kotlin') -Directory -Filter "compile${Variant}Kotlin*" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force $env:JAVA_HOME = $JavaHome - cmd /c ".\gradlew.bat assemble$Variant --no-build-cache --console=plain" + # "2>&1" inside cmd: Gradle prints compiler warnings on its error stream. If this script's + # output is piped or sent to a file, PowerShell would otherwise take the first such line + # for an error and stop the build. Only the exit code says whether the build failed. + cmd /c ".\gradlew.bat assemble$Variant --no-build-cache --console=plain 2>&1" if ($LASTEXITCODE -ne 0) { throw "The build failed." } } if (-not (Test-Path $apk)) { throw "Expected the APK at $apk, but it is not there." }