bootstrap.sh: use set +u guard around BASH_SOURCE to fix pipe execution
${BASH_SOURCE[0]:-} still triggers set -u when BASH_SOURCE is entirely
unset (not just empty) in pipe mode. Temporarily disable -u for that
single assignment, then restore it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LQJBvqzXeyuhhAcAA3Q5Wq
This commit is contained in:
@@ -48,7 +48,9 @@ echo ""
|
|||||||
|
|
||||||
# ── Option 3: already running from inside the repo ───────────────────────────
|
# ── Option 3: already running from inside the repo ───────────────────────────
|
||||||
# If setup.sh is sitting next to this script, we have everything we need.
|
# If setup.sh is sitting next to this script, we have everything we need.
|
||||||
|
set +u
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd || echo "")"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-}")" 2>/dev/null && pwd || echo "")"
|
||||||
|
set -u
|
||||||
if [ -f "${SCRIPT_DIR}/setup.sh" ]; then
|
if [ -f "${SCRIPT_DIR}/setup.sh" ]; then
|
||||||
echo " Running from local copy at $SCRIPT_DIR"
|
echo " Running from local copy at $SCRIPT_DIR"
|
||||||
echo " (No git or internet needed)"
|
echo " (No git or internet needed)"
|
||||||
|
|||||||
Reference in New Issue
Block a user