From a197c43b512a4c2a1f12f686f29e15fc49d70882 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Sun, 27 Sep 2026 19:52:03 +1000 Subject: [PATCH] fix(tools): make build-wasm-modules.sh source dir absolute (#7834) Co-authored-by: Claude Opus 5.5 --- tools/build-wasm-modules.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/build-wasm-modules.sh b/tools/build-wasm-modules.sh index 31ef0b32a..5d3898640 100755 --- a/tools/build-wasm-modules.sh +++ b/tools/build-wasm-modules.sh @@ -10,6 +10,13 @@ if [[ -z ${SRCDIR} ]]; then SRCDIR="$(pwd)" fi +# Make SRCDIR absolute, as it is also used from within other directories +# (e.g. the WASI SDK fetch project below) +if ! SRCDIR="$(cd "${SRCDIR}" && pwd)"; then + echo "❌ Source directory not found: $1" + exit 1 +fi + if [[ -z ${OUTDIR} ]]; then OUTDIR="$(pwd)/output" fi