Skip to content

Commit

Permalink
Add changes from bazelbuild#6955
Browse files Browse the repository at this point in the history
  • Loading branch information
ianoc-stripe committed Jul 10, 2019
1 parent b5c9225 commit 50c030b
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,19 @@ if [ -z "$CLASSPATH_LIMIT" ]; then
is_windows && CLASSPATH_LIMIT=7000 || CLASSPATH_LIMIT=120000
fi

JARBIN="%jarbin%"
PERCENTAGE_LITERAL="%"
JARBIN_LITERAL="${PERCENTAGE_LITERAL}jarbin${PERCENTAGE_LITERAL}"
# if jarbin is evaluated to empty string or not substituted fallback to previous behavior
# for backwards compatibility
if [ -z "$JARBIN" ] || [ "$JARBIN" == "$JARBIN_LITERAL" ] ; then
JARBIN="local_jdk/bin/jar"
fi

if is_windows && (("${#CLASSPATH}" > ${CLASSPATH_LIMIT} )); then
create_and_run_classpath_jar "local_jdk/bin/jar.exe"
create_and_run_classpath_jar "${JARBIN}.exe"
elif (("${#CLASSPATH}" > ${CLASSPATH_LIMIT})); then
create_and_run_classpath_jar "local_jdk/bin/jar"
create_and_run_classpath_jar "$JARBIN"
else
exec $JAVABIN -classpath $CLASSPATH "${ARGS[@]}"
fi

0 comments on commit 50c030b

Please sign in to comment.