File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,22 @@ if [ -n "$SKIP_HATCH" ]; then
1818 run_hatch () {
1919 bash ./.evergreen/run-tests.sh
2020 }
21- elif $PYTHON_BINARY -m hatch --version; then
22- run_hatch () {
23- $PYTHON_BINARY -m hatch run " $@ "
24- }
25- else # No toolchain hatch present, set up virtualenv before installing hatch
21+ else # Set up virtualenv before installing hatch
2622 # Use a random venv name because the encryption tasks run this script multiple times in the same run.
2723 ENV_NAME=hatchenv-$RANDOM
2824 createvirtualenv " $PYTHON_BINARY " $ENV_NAME
2925 # shellcheck disable=SC2064
3026 trap " deactivate; rm -rf $ENV_NAME " EXIT HUP
3127 python -m pip install -q hatch
28+
29+ # Ensure hatch does not write to user or global locations.
30+ touch hatch_config.toml
31+ HATCH_CONFIG=$( pwd) /hatch_config.toml
32+ export HATCH_CONFIG
33+ hatch config restore
34+ hatch config set dirs.data " .hatch/data"
35+ hatch config set dirs.cache " .hatch/cache"
36+
3237 run_hatch () {
3338 python -m hatch run " $@ "
3439 }
You can’t perform that action at this time.
0 commit comments