add replace from '+' to '-' (#3027)

This commit is contained in:
Dmitry Shibanov
2021-03-27 10:51:01 +03:00
committed by GitHub
parent b56d115a16
commit 60459a5b04
2 changed files with 3 additions and 2 deletions

View File

@@ -10,10 +10,11 @@ function Get-JavaVersions {
$javaPath = $_.Value
# Take semver from the java path
$version = $javaPath.split('/')[5]
$fullVersion = $version.Replace('-', '+')
$defaultPostfix = ($javaPath -eq $defaultJavaPath) ? " (default)" : ""
[PSCustomObject] @{
"Version" = $version + $defaultPostfix
"Version" = $fullVersion + $defaultPostfix
"Vendor" = "Adopt OpenJDK"
"Environment Variable" = $_.Name
}