File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 33
44. .evergreen/scripts/setup-dev-env.sh ensure-uv
55
6+ env
67just " $@ "
Original file line number Diff line number Diff line change 2424# Ensure dependencies are installed.
2525bash $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
5053fi
You can’t perform that action at this time.
0 commit comments