Unset CDPATH while getting SCRIPT_DIR

This commit is contained in:
San Gillis
2025-10-25 11:34:26 +02:00
parent e6d6f3cdee
commit 2a7c2e9398
5 changed files with 5 additions and 5 deletions

View File

@@ -114,7 +114,7 @@ check_existing_branches() {
# Resolve repository root. Prefer git information when available, but fall back
# to searching for repository markers so the workflow still functions in repositories that
# were initialised with --no-git.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if git rev-parse --show-toplevel >/dev/null 2>&1; then
REPO_ROOT=$(git rev-parse --show-toplevel)