Skip to content

Commit c3bca88

Browse files
committed
cleanup
1 parent d4a3221 commit c3bca88

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.evergreen/just.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ set -eu
33

44
. .evergreen/scripts/setup-dev-env.sh ensure-uv
55

6+
env
67
just "$@"

.evergreen/scripts/setup-dev-env.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ fi
2424
# Ensure dependencies are installed.
2525
bash $HERE/install-dependencies.sh
2626

27-
# Only run the next part if not running on CI and there is a git checkout.
28-
if [ -z "${CI:-}" ] && [ -f $HERE/.git ]; then
27+
# Only run the next part if not running on CI.
28+
if [ -z "${CI:-}" ]; then
2929
# Add the default install path to the path if needed.
3030
if [ -z "${PYMONGO_BIN_DIR:-}" ]; then
3131
export PATH="$PATH:$HOME/.local/bin"
@@ -40,11 +40,14 @@ if [ -z "${CI:-}" ] && [ -f $HERE/.git ]; then
4040
cd $ROOT && uv sync
4141
)
4242

43-
if ! command -v pre-commit &>/dev/null; then
44-
uv tool install pre-commit
45-
fi
43+
# Only set up pre-commit if we are in a git checkout.
44+
if [ -f $HERE/.git ]; then
45+
if ! command -v pre-commit &>/dev/null; then
46+
uv tool install pre-commit
47+
fi
4648

47-
if [ ! -f .git/hooks/pre-commit ]; then
48-
uvx pre-commit install
49+
if [ ! -f .git/hooks/pre-commit ]; then
50+
uvx pre-commit install
51+
fi
4952
fi
5053
fi

0 commit comments

Comments
 (0)