Skip to content

Commit f205fa3

Browse files
authored
Merge pull request #1039 from sgillis/fix-cdpath-issue
Unset CDPATH while getting SCRIPT_DIR
2 parents 4767d77 + 2a7c2e9 commit f205fa3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

scripts/bash/check-prerequisites.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ EOF
7575
done
7676

7777
# Source common functions
78-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
78+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7979
source "$SCRIPT_DIR/common.sh"
8080

8181
# Get feature paths and validate branch

scripts/bash/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ get_repo_root() {
77
git rev-parse --show-toplevel
88
else
99
# Fall back to script location for non-git repos
10-
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10+
local script_dir="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1111
(cd "$script_dir/../../.." && pwd)
1212
fi
1313
}

scripts/bash/create-new-feature.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ clean_branch_name() {
167167
# Resolve repository root. Prefer git information when available, but fall back
168168
# to searching for repository markers so the workflow still functions in repositories that
169169
# were initialised with --no-git.
170-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
170+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
171171

172172
if git rev-parse --show-toplevel >/dev/null 2>&1; then
173173
REPO_ROOT=$(git rev-parse --show-toplevel)

scripts/bash/setup-plan.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ for arg in "$@"; do
2424
done
2525

2626
# Get script directory and load common functions
27-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
27+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2828
source "$SCRIPT_DIR/common.sh"
2929

3030
# Get all paths and variables from common functions

scripts/bash/update-agent-context.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ set -o pipefail
4949
#==============================================================================
5050

5151
# Get script directory and load common functions
52-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
52+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5353
source "$SCRIPT_DIR/common.sh"
5454

5555
# Get all paths and variables from common functions

0 commit comments

Comments
 (0)