Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 62afbac

Browse files
joaoandremartinsemrekultursay
authored andcommitted
Sets CDBG_APP_WEB_INF_DIR in the runtime and uses it here.
$RUNTIME_DIR still read for backwards compatibility. See: GoogleCloudPlatform/openjdk-runtime#94 GoogleCloudPlatform/jetty-runtime#164 GoogleCloudPlatform/openjdk-runtime#64 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155654900
1 parent 96aeb16 commit 62afbac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/agent/format-env-appengine-vm.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ if [[ -n "${CDBG_DISABLE}" ]]; then
3131
exit
3232
fi
3333

34-
APP_WEB_INF_DIR="${RUNTIME_DIR}/webapps/root/WEB-INF"
3534
CDBG_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3635

3736
ARGS="-agentpath:${CDBG_ROOT}/cdbg_java_agent.so="
@@ -41,8 +40,11 @@ ARGS+=",--alsologtostderr=true"
4140
# When using Jetty/Tomcat images, the debugger should also read the
4241
# WEB-INF/classes and WEB-INF/lib directories. When using the OpenJDK
4342
# image (which deploys a JAR), this is not necessary.
44-
if [[ ! -z "${RUNTIME_DIR}" ]]; then
45-
ARGS+=",--cdbg_extra_class_path=${APP_WEB_INF_DIR}/classes:${APP_WEB_INF_DIR}/lib"
43+
if [[ -n "${RUNTIME_DIR}" && -z "${CDBG_APP_WEB_INF_DIR}" ]]; then
44+
CDBG_APP_WEB_INF_DIR="${RUNTIME_DIR}/webapps/root/WEB-INF"
45+
fi
46+
if [[ -n "${CDBG_APP_WEB_INF_DIR}" ]]; then
47+
ARGS+=",--cdbg_extra_class_path=${CDBG_APP_WEB_INF_DIR}/classes:${CDBG_APP_WEB_INF_DIR}/lib"
4648
fi
4749

4850
echo "${ARGS}"

0 commit comments

Comments
 (0)