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

@@ -7,7 +7,7 @@ get_repo_root() {
git rev-parse --show-toplevel
else
# Fall back to script location for non-git repos
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
local script_dir="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
(cd "$script_dir/../../.." && pwd)
fi
}