mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-11-28 14:51:05 +01:00
Properly detect OpenJDK versions in bin/ruby-build
OpenJDK reports its version slightly different than Oracle Java, and this was causing the logic in bin/ruby-build to not detect Java 7 or higher when OpenJDK was used.
This commit is contained in:
parent
89a23a4688
commit
4c0df6afdb
2 changed files with 13 additions and 1 deletions
|
|
@ -701,7 +701,7 @@ fix_rbx_irb() {
|
|||
}
|
||||
|
||||
require_java7() {
|
||||
local version="$(java -version 2>&1 | grep 'java version' | head -1)"
|
||||
local version="$(java -version 2>&1 | grep '\(java\|openjdk\) version' | head -1)"
|
||||
if [[ $version != *1.[789]* ]]; then
|
||||
colorize 1 "ERROR" >&3
|
||||
echo ": Java 7 required. Please install a 1.7-compatible JRE." >&3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue