Skip to content

Commit f41033d

Browse files
committed
fix handling of just on windows
1 parent 07d8483 commit f41033d

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.evergreen/install-dependencies.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,22 @@ else
2020
BIN_DIR=$HOME/.local/bin
2121
fi
2222
if [ ! -f $BIN_DIR/just ]; then
23-
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to "$BIN_DIR" || {
23+
if [ "Windows_NT" = "${OS:-}" ]; then
24+
TARGET="--target x86_64-pc-windows-msvc"
25+
else
26+
TARGET=""
27+
fi
28+
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- $TARGET --to "$BIN_DIR" || {
2429
# CARGO_HOME is defined in configure-env.sh
2530
export CARGO_HOME=${CARGO_HOME:-$HOME/.cargo/}
2631
export RUSTUP_HOME="${CARGO_HOME}/.rustup"
27-
${DRIVERS_TOOLS}/.evergreen/install-rust.sh
32+
. ${DRIVERS_TOOLS}/.evergreen/install-rust.sh
2833
cargo install just
29-
mv $CARGO_HOME/just $BIN_DIR
34+
if [ "Windows_NT" = "${OS:-}" ]; then
35+
mv $CARGO_HOME/just.exe $BIN_DIR/just
36+
else
37+
mv $CARGO_HOME/just $BIN_DIR
38+
fi
3039
}
3140
fi
3241

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -o xtrace
3+
set -eu
44
file="$PROJECT_DIRECTORY/.evergreen/install-dependencies.sh"
55
# Don't use ${file} syntax here because evergreen treats it as an empty expansion.
66
[ -f "$file" ] && bash "$file" || echo "$file not available, skipping"

0 commit comments

Comments
 (0)