aboutsummaryrefslogtreecommitdiffhomepage
path: root/gradlew
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2023-08-21 19:16:46 +1000
committerNassim Jahnke <[email protected]>2023-08-21 19:16:46 +1000
commitaf6142eab311c4e4b713d53f6a2c626fc62ee1a8 (patch)
tree4641e97cf8e08f5166157d8fec4972ac5f025faf /gradlew
parent00a68b1efeab772b7251fefeb22a2276656d26e2 (diff)
downloadPaper-af6142eab311c4e4b713d53f6a2c626fc62ee1a8.tar.gz
Paper-af6142eab311c4e4b713d53f6a2c626fc62ee1a8.zip
[ci skip] Update Gradle wrapper
Diffstat (limited to 'gradlew')
-rwxr-xr-xgradlew15
1 files changed, 10 insertions, 5 deletions
diff --git a/gradlew b/gradlew
index 79a61d421c..0adc8e1a53 100755
--- a/gradlew
+++ b/gradlew
@@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
@@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in