Skip to content

Commit 6335f9c

Browse files
committed
fix windows handling
1 parent c311dea commit 6335f9c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.evergreen/scripts/configure-env.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ fi
2929

3030
PATH_EXT="$MONGODB_BINARIES:$DRIVERS_TOOLS_BINARIES:$PYMONGO_BIN_DIR:\$PATH"
3131

32+
# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
33+
if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
34+
DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
35+
PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
36+
CARGO_HOME=$(cygpath -m $CARGO_HOME)
37+
UV_TOOL_DIR=$(cygpath -m "$UV_TOOL_DIR")
38+
UV_CACHE_DIR=$(cygpath -m "$UV_CACHE_DIR")
39+
DRIVERS_TOOLS_BINARIES=$(cygpath -m "$DRIVERS_TOOLS_BINARIES")
40+
MONGODB_BINARIES=$(cygpath -m "$MONGODB_BINARIES")
41+
PYMONGO_BIN_DIR=$(cygpath -m "$PYMONGO_BIN_DIR")
42+
fi
43+
3244
# If the toolchain is available, symlink binaries to the bin dir.
3345
_bin_path=""
3446
if [ "Windows_NT" == "${OS:-}" ]; then
@@ -43,21 +55,9 @@ if [ -d "${_bin_path}" ]; then
4355
if [ "Windows_NT" == "${OS:-}" ]; then
4456
_suffix=".exe"
4557
fi
46-
ln -s ${_bin_path}/just${_suffix} $PYMONGO_BIN_DIR/just
47-
ln -s ${_bin_path}/uv${_suffix} $PYMONGO_BIN_DIR/uv
48-
ln -s ${_bin_path}/uvx${_suffix} $PYMONGO_BIN_DIR/uvx
49-
fi
50-
51-
# Python has cygwin path problems on Windows. Detect prospective mongo-orchestration home directory
52-
if [ "Windows_NT" = "${OS:-}" ]; then # Magic variable in cygwin
53-
DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
54-
PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
55-
CARGO_HOME=$(cygpath -m $CARGO_HOME)
56-
UV_TOOL_DIR=$(cygpath -m "$UV_TOOL_DIR")
57-
UV_CACHE_DIR=$(cygpath -m "$UV_CACHE_DIR")
58-
DRIVERS_TOOLS_BINARIES=$(cygpath -m "$DRIVERS_TOOLS_BINARIES")
59-
MONGODB_BINARIES=$(cygpath -m "$MONGODB_BINARIES")
60-
PYMONGO_BIN_DIR=$(cygpath -m "$PYMONGO_BIN_DIR")
58+
ln -s ${_bin_path}/just${_suffix} $PYMONGO_BIN_DIR/just${_suffix}
59+
ln -s ${_bin_path}/uv${_suffix} $PYMONGO_BIN_DIR/uv${_suffix}
60+
ln -s ${_bin_path}/uvx${_suffix} $PYMONGO_BIN_DIR/uvx${_suffix}
6161
fi
6262

6363
SCRIPT_DIR="$PROJECT_DIRECTORY/.evergreen/scripts"

0 commit comments

Comments
 (0)