mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-04 23:11:08 +02:00
Relax java version regexp
This allows the java version to be specified as "9", instead of "1.9". Closes #1135
This commit is contained in:
parent
e40cd1f73b
commit
4889ec7ca6
2 changed files with 13 additions and 1 deletions
|
@ -773,7 +773,7 @@ fix_rbx_irb() {
|
||||||
|
|
||||||
require_java7() {
|
require_java7() {
|
||||||
local version="$(java -version 2>&1 | grep '\(java\|openjdk\) version' | head -1)"
|
local version="$(java -version 2>&1 | grep '\(java\|openjdk\) version' | head -1)"
|
||||||
if [[ $version != *1.[789]* ]]; then
|
if [[ $version != *[789]* ]]; then
|
||||||
colorize 1 "ERROR" >&3
|
colorize 1 "ERROR" >&3
|
||||||
echo ": Java 7 required. Please install a 1.7-compatible JRE." >&3
|
echo ": Java 7 required. Please install a 1.7-compatible JRE." >&3
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -622,6 +622,18 @@ DEF
|
||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "JRuby Java 9 version string" {
|
||||||
|
cached_tarball "jruby-9000.dev" bin/jruby
|
||||||
|
|
||||||
|
stub java '-version : echo java version "9" >&2'
|
||||||
|
|
||||||
|
run_inline_definition <<DEF
|
||||||
|
require_java7
|
||||||
|
install_package "jruby-9000.dev" "http://ci.jruby.org/jruby-dist-9000.dev-bin.tar.gz" jruby
|
||||||
|
DEF
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
@test "non-writable TMPDIR aborts build" {
|
@test "non-writable TMPDIR aborts build" {
|
||||||
export TMPDIR="${TMP}/build"
|
export TMPDIR="${TMP}/build"
|
||||||
mkdir -p "$TMPDIR"
|
mkdir -p "$TMPDIR"
|
||||||
|
|
Loading…
Reference in a new issue