fix: ensure SCRIPT_DIR is set correctly in setup script

This commit is contained in:
Linus Rath
2026-03-13 00:40:06 +01:00
parent eb6e73191f
commit 60a6ede063
+7 -1
View File
@@ -44,7 +44,13 @@ DOT="${DIM}·${RESET}"
BULLET="${BLUE}${RESET}"
# ── State ───────────────────────────────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
set +u
if [[ -n "${BASH_SOURCE[0]:-}" ]]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
else
SCRIPT_DIR="$(pwd)"
fi
set -u
ENV_FILE="${SCRIPT_DIR}/.env.local"
# Config values (defaults)