Skip to content

Commit 0febfae

Browse files
authored
fix relative embed paths early enough (#2199)
fix #1164
1 parent 832b3b5 commit 0febfae

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

build-static.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ else
147147
spcCommand="./bin/spc"
148148
fi
149149

150+
# turn potentially relative EMBED path into absolute path
151+
if [ -n "${EMBED}" ]; then
152+
if [[ "${EMBED}" != /* ]]; then
153+
EMBED="${CURRENT_DIR}/${EMBED}"
154+
fi
155+
fi
156+
150157
# Extensions to build
151158
if [ -z "${PHP_EXTENSIONS}" ]; then
152159
# enable EMBED mode, first check if project has dumped extensions
@@ -178,9 +185,6 @@ fi
178185

179186
# Embed PHP app, if any
180187
if [ -n "${EMBED}" ] && [ -d "${EMBED}" ]; then
181-
if [[ "${EMBED}" != /* ]]; then
182-
EMBED="${CURRENT_DIR}/${EMBED}"
183-
fi
184188
# shellcheck disable=SC2089
185189
SPC_OPT_BUILD_ARGS="${SPC_OPT_BUILD_ARGS} --with-frankenphp-app='${EMBED}'"
186190
fi

0 commit comments

Comments
 (0)