Skip to content

Commit c4311b7

Browse files
committed
fix handling of paths
1 parent a3c75b5 commit c4311b7

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.evergreen/scripts/configure-env.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ DRIVERS_TOOLS="$(dirname $PROJECT_DIRECTORY)/drivers-tools"
1616
CARGO_HOME=${CARGO_HOME:-${DRIVERS_TOOLS}/.cargo}
1717
UV_TOOL_DIR=$PROJECT_DIRECTORY/.local/uv/tools
1818
UV_CACHE_DIR=$PROJECT_DIRECTORY/.local/uv/cache
19+
DRIVERS_TOOLS_BINARIES="$DRIVERS_TOOLS/.bin"
20+
21+
# On Evergreen jobs, "CI" will be set, and we don't want to write to $HOME.
22+
if [ "${CI:-}" == "true" ]; then
23+
PYMONGO_BIN_DIR=${DRIVERS_TOOLS_BINARIES:-}
24+
# We want to use a path that's already on PATH on spawn hosts.
25+
else
26+
PYMONGO_BIN_DIR=$HOME/cli_bin
27+
fi
1928

2029
# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
2130
if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
@@ -24,6 +33,8 @@ if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
2433
CARGO_HOME=$(cygpath -m $CARGO_HOME)
2534
UV_TOOL_DIR=$(cygpath -m "$UV_TOOL_DIR")
2635
UV_CACHE_DIR=$(cygpath -m "$UV_CACHE_DIR")
36+
DRIVERS_TOOLS_BINARIES=$(cygpath -m "$DRIVERS_TOOLS_BINARIES")
37+
PYMONGO_BIN_DIR=$(cygpath -m "$PYMONGO_BIN_DIR")
2738
fi
2839

2940
SCRIPT_DIR="$PROJECT_DIRECTORY/.evergreen/scripts"
@@ -36,15 +47,6 @@ fi
3647

3748
export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
3849
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
39-
export DRIVERS_TOOLS_BINARIES="$DRIVERS_TOOLS/.bin"
40-
41-
# On Evergreen jobs, "CI" will be set, and we don't want to write to $HOME.
42-
if [ "${CI:-}" == "true" ]; then
43-
PYMONGO_BIN_DIR=${DRIVERS_TOOLS_BINARIES:-}
44-
# We want to use a path that's already on PATH on spawn hosts.
45-
else
46-
PYMONGO_BIN_DIR=$HOME/cli_bin
47-
fi
4850

4951
cat <<EOT > "$SCRIPT_DIR"/env.sh
5052
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"

0 commit comments

Comments
 (0)