fix: reference SOURCECODE_WORK_DIR in builder core-post-extract

The builder-dockerfile, builder-lambda, builder-nixpacks, builder-pack and builder-railpack `core-post-extract` triggers assigned `$2` to a local `SOURCECODE_WORK_DIR` but called `pushd "$TMP_WORK_DIR"`, which was unset. Bash 5.2 silently accepted `pushd ""`, so the bug stayed dormant. Bash 5.3 (shipped with Ubuntu 26.04) makes it a hard error and `set -e` aborts the trigger, causing every `git push` to fail with `pushd: null directory`.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-07 12:39:46 -04:00
parent 368a6999c9
commit eb17a383c6
10 changed files with 120 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ trigger-builder-railpack-core-post-extract() {
declare APP="$1" SOURCECODE_WORK_DIR="$2"
local NEW_RAILPACK_JSON="$(fn-builder-railpack-computed-railpackjson-path "$APP")"
pushd "$TMP_WORK_DIR" >/dev/null
pushd "$SOURCECODE_WORK_DIR" >/dev/null
if [[ -z "$NEW_RAILPACK_JSON" ]]; then
return