1515# See the License for the specific language governing permissions and
1616# limitations under the License.
1717#
18+ # SPDX-License-Identifier: Apache-2.0
19+ #
1820
1921# #############################################################################
2022#
9597# shellcheck disable=SC2034
9698APP_BASE_NAME=${0##*/ }
9799# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
98- APP_HOME=$( cd " ${APP_HOME:- ./ } " > /dev/null && pwd -P ) || exit
100+ APP_HOME=$( cd -P " ${APP_HOME:- ./ } " > /dev/null && printf ' %s\n ' " $PWD " ) || exit
99101
100102# Use the maximum available, or set MAX_FD != -1 to use that value.
101103MAX_FD=maximum
@@ -123,7 +125,7 @@ case "$( uname )" in #(
123125 NONSTOP* ) nonstop=true ;;
124126esac
125127
126- CLASSPATH=$APP_HOME /gradle/wrapper/gradle-wrapper.jar
128+ CLASSPATH=" \\\"\\\" "
127129
128130
129131# Determine the Java command to use to start the JVM.
214216DEFAULT_JVM_OPTS=' "-Xmx64m" "-Xms64m"'
215217
216218# Collect all arguments for the java command:
217- # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
219+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
218220# and any embedded shellness will be escaped.
219221# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
220222# treated as '${Hostname}' itself on the command line.
221223
222224set -- \
223225 " -Dorg.gradle.appname=$APP_BASE_NAME " \
224226 -classpath " $CLASSPATH " \
225- org. gradle. wrapper.GradleWrapperMain \
227+ -jar " $APP_HOME / gradle/ wrapper/gradle-wrapper.jar " \
226228 " $@ "
227229
228230# Stop when "xargs" is not available.
@@ -257,4 +259,4 @@ eval "set -- $(
257259 tr ' \n' ' '
258260 ) " ' "$@"'
259261
260- exec " $JAVACMD " " $@ "
262+ exec " $JAVACMD " " $@ "
0 commit comments