Skip to content

Commit

Permalink
[WFCORE-6552] Add missing search for WARNING to Windows package avail…
Browse files Browse the repository at this point in the history
…ability check
  • Loading branch information
bstansberry committed Oct 10, 2023
1 parent 98b9d18 commit 49fc709
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if exist "%COMMON_CONF%" (
goto :eof

:setPackageAvailable
"%JAVA%" --add-opens=%~1=ALL-UNNAMED -version >nul 2>&1 && (set PACKAGE_AVAILABLE=true) || (set PACKAGE_AVAILABLE=false)
"%JAVA%" --add-opens=%~1=ALL-UNNAMED -version | findstr /c:"WARNING" >nul 2>&1 && (set PACKAGE_AVAILABLE=true) || (set PACKAGE_AVAILABLE=false)
goto :eof

:setEnhancedSecurityManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Function Get-Java-Opts {

Function SetPackageAvailable($packageName) {
$PACKAGE_AVAILABLE = $false
& $JAVA "--add-opens=$packageName=ALL-UNNAMED" -version >$null 2>&1
& $JAVA "--add-opens=$packageName=ALL-UNNAMED" -version | Out-String -Stream | Select-String 'WARNING' -SimpleMatch -Quiet >$null 2>&1
if ($LastExitCode -eq 0){
$PACKAGE_AVAILABLE = $true
}
Expand Down

0 comments on commit 49fc709

Please sign in to comment.