Skip to content

Commit

Permalink
Fix java regex to detect OpenJDK
Browse files Browse the repository at this point in the history
  • Loading branch information
boazy committed Jul 12, 2021
1 parent afb6132 commit ecd97ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plummy-cli/jvm/java_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
)

var versionLineRegex = regexp.MustCompile("^java version \"([^\"])+\"")
var versionLineRegex = regexp.MustCompile("^(?:java|openjdk) version \"([^\"])+\"")
var oldStyleVersionRegex = regexp.MustCompile("^1\\.(\\d+)")
var newStyleVersionRegex = regexp.MustCompile("^\\d+")

Expand Down

0 comments on commit ecd97ca

Please sign in to comment.