From 4315decfd207a2cb76b274e12fdd0f8b829c64a6 Mon Sep 17 00:00:00 2001 From: henderkes Date: Tue, 17 Feb 2026 21:29:28 +0700 Subject: [PATCH] fix relative embed paths early enough --- build-static.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build-static.sh b/build-static.sh index 638688c0a..068cef701 100755 --- a/build-static.sh +++ b/build-static.sh @@ -147,6 +147,13 @@ else spcCommand="./bin/spc" fi +# turn potentially relative EMBED path into absolute path +if [ -n "${EMBED}" ]; then + if [[ "${EMBED}" != /* ]]; then + EMBED="${CURRENT_DIR}/${EMBED}" + fi +fi + # Extensions to build if [ -z "${PHP_EXTENSIONS}" ]; then # enable EMBED mode, first check if project has dumped extensions @@ -178,9 +185,6 @@ fi # Embed PHP app, if any if [ -n "${EMBED}" ] && [ -d "${EMBED}" ]; then - if [[ "${EMBED}" != /* ]]; then - EMBED="${CURRENT_DIR}/${EMBED}" - fi # shellcheck disable=SC2089 SPC_OPT_BUILD_ARGS="${SPC_OPT_BUILD_ARGS} --with-frankenphp-app='${EMBED}'" fi