Skip to content

Commit 89141ab

Browse files
committed
fix: symlink TEST_BASH in restricted PATH test (bash 3.2 CI fix)
The PATH augmentation test builds a minimal $rbin directory but only symlinked 'bash'. In the bash 3.2 CI matrix, TEST_BASH=bash3.2, so the subshell invocation failed with 'command not found'. Symlink the TEST_BASH binary too when it differs from 'bash'.
1 parent e7ae705 commit 89141ab

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/run-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,11 @@ for _c in dirname mkdir sed ps tr tail mv cat date jq awk gzip tar md5sum; do
11701170
_p=$(command -v "$_c" 2>/dev/null || true)
11711171
[ -n "$_p" ] && ln -sf "$_p" "$rbin/$_c"
11721172
done
1173-
# Also need bash itself for the subshell
1173+
# Also need bash itself for the subshell (and TEST_BASH variant like bash3.2)
11741174
ln -sf "$(command -v bash)" "$rbin/bash"
1175+
if [ -n "${TEST_BASH:-}" ] && [ "$TEST_BASH" != "bash" ] && command -v "$TEST_BASH" >/dev/null 2>&1; then
1176+
ln -sf "$(command -v "$TEST_BASH")" "$rbin/$TEST_BASH"
1177+
fi
11751178
11761179
# Run the save script's preamble + get_codex_session under the restricted PATH.
11771180
# The PATH augmentation block should find python3 and make Method 3 work.

0 commit comments

Comments
 (0)