Skip to content

Commit

Permalink
Fix #2982: Bazel installer should not check for installed JDK if usin…
Browse files Browse the repository at this point in the history
…g a bundled JDK.

PiperOrigin-RevId: 156092071
  • Loading branch information
philwo authored and hlopko committed May 23, 2017
1 parent f5516fb commit 171a230
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions scripts/packages/template_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,20 @@ if [ -z "${JAVA_HOME-}" ]; then
;;
esac
fi
if [ ! -x "${JAVA_HOME}/bin/javac" ]; then
echo >&2
echo "Java not found, please install the corresponding package" >&2
echo "See http://bazel.build/docs/install.html for more information on" >&2
echo "dependencies of Bazel." >&2
exit 1
fi

# Only check for an installed JDK if this version of Bazel does not contain a
# bundled JDK.
case "$0" in
*without-jdk*)
if [ ! -x "${JAVA_HOME}/bin/javac" ]; then
echo >&2
echo "Java not found, please install the corresponding package." >&2
echo "See http://bazel.build/docs/install.html for more information on" >&2
echo "dependencies of Bazel." >&2
exit 1
fi
;;
esac

# Test for write access
test_write "${bin}"
Expand Down

0 comments on commit 171a230

Please sign in to comment.