Skip to content

Commit

Permalink
Remove failure if Java version cannot be detected (there are repos wi…
Browse files Browse the repository at this point in the history
…th java_home but no Java)
  • Loading branch information
comius committed Jan 8, 2021
1 parent 451334e commit eb5be70
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rules/rbe_repo/container.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,7 @@ def get_java_version(ctx, docker_tool_path, image_name, java_home):
strip_properties = [property.strip() for property in properties_out.splitlines()]
version_property = [property for property in strip_properties if property.startswith("java.version = ")]
if len(version_property) != 1:
fail("Could not detect Java verison in the container and one was " +
"not passed to rbe_autoconfig rule. Java version is required " +
"because create_java_configs is set to True")
return "unknown"

version_value = version_property[0][len("java.version = "):]
(major, minor, rest) = version_value.split(".", 2)
Expand Down

0 comments on commit eb5be70

Please sign in to comment.