Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

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

PiperOrigin-RevId: 156092071
  • Loading branch information
philwo authored and dslomov committed May 15, 2017
1 parent 33e35aa commit baca6e4
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 baca6e4

Please sign in to comment.