Harden VMID 5000 frontend deploy server discovery

This commit is contained in:
defiQUG
2026-04-29 06:19:32 -07:00
parent 1aa81f454a
commit f5eb874210

View File

@@ -114,7 +114,9 @@ fi
APP_RELATIVE_DIR="."
APP_SERVER_PATH="${STANDALONE_ROOT}/server.js"
if [[ ! -f "${APP_SERVER_PATH}" ]]; then
ALT_SERVER_PATH="$(find "${STANDALONE_ROOT}" -path '*/server.js' -print | head -n 1 || true)"
ALT_SERVER_PATH="$(find "${STANDALONE_ROOT}" \
-path '*/node_modules' -prune -o \
-path '*/server.js' -print | head -n 1 || true)"
if [[ -n "${ALT_SERVER_PATH}" ]]; then
APP_SERVER_PATH="${ALT_SERVER_PATH}"
APP_RELATIVE_DIR="$(dirname "${ALT_SERVER_PATH#${STANDALONE_ROOT}/}")"