mirror of https://github.com/sbt/sbt.git
Merge pull request #5964 from rdesgroppes/detect-adoptopenjdk-on-macos
Detect AdoptOpenJDK on macOS
This commit is contained in:
commit
b806d3ed3d
|
|
@ -388,7 +388,7 @@ private[sbt] object CrossJava {
|
|||
|
||||
object JavaDiscoverConfig {
|
||||
object JavaHomeDir {
|
||||
private val regex = """(\w+-)?(java-|jdk-?)(bin-)?(1\.)?([0-9]+).*""".r
|
||||
private val regex = """(\w+-)?(java-|(?:adoptopen)?jdk-?)(bin-)?(1\.)?([0-9]+).*""".r
|
||||
def unapply(s: CharSequence): Option[String] = {
|
||||
s match {
|
||||
case regex(vendor, _, _, m, n) => Some(JavaVersion(nullBlank(m) + n).toString)
|
||||
|
|
|
|||
Loading…
Reference in New Issue