From de82cc15d64e6fb2dbe873d3735d2e01323a16ae Mon Sep 17 00:00:00 2001 From: g* Date: Sun, 9 Nov 2025 15:39:38 +0100 Subject: [PATCH] . --- .envrc | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.envrc b/.envrc index d476346..735a2ed 100644 --- a/.envrc +++ b/.envrc @@ -2,28 +2,29 @@ # Check if .venv exists if [[ -d ".venv" ]]; then - # Activate the virtual environment - export VIRTUAL_ENV="$PWD/.venv" - export PATH="$VIRTUAL_ENV/bin:$PATH" - - # Verify we're using the right Python - if [[ -x "$VIRTUAL_ENV/bin/python" ]]; then - export PYTHONPATH="$PWD/src:$PYTHONPATH" - echo "Activated virtual environment: $VIRTUAL_ENV" - else - echo "Warning: Virtual environment Python not found" - fi + # Activate the virtual environment + export VIRTUAL_ENV="$PWD/.venv" + export PATH="$VIRTUAL_ENV/bin:$PATH" + + # Verify we're using the right Python + if [[ -x "$VIRTUAL_ENV/bin/python" ]]; then + export PYTHONPATH="$PWD/src:$PYTHONPATH" + echo "Activated virtual environment: $VIRTUAL_ENV" + else + echo "Warning: Virtual environment Python not found" + fi + else - echo "Warning: No .venv directory found" + echo "Warning: No .venv directory found" fi # Run uv sync to update packages if command -v uv &> /dev/null; then - echo "Running uv sync..." - uv sync - echo "Packages updated successfully" + echo "Running uv sync..." + uv sync + echo "Packages updated successfully" else - echo "Warning: uv not found" + echo "Warning: uv not found" fi echo "Environment configured with direnv"