feat(venv): make activate-venv script respect VENV_PATH and auto-create venv with uv

This commit is contained in:
Janik von Rotz committed 2026-06-11 12:21:17 +02:00
1 parent 6d69517854
commit 34fb132524
1 file changed
+6 -4
+6 -4
View File
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
activate-venv() {
if [[ -f ".venv/bin/activate" ]]; then
source ".venv/bin/activate"
VENV="${VENV_PATH:-.venv}"
if [[ -f "$VENV/bin/activate" ]]; then
source "$VENV/bin/activate"
else
echo "Could not find .venv/bin/active"
echo "Could not find $VENV/bin/activate"
echo "Init venv with $(uv --version)"
uv venv
uv venv "$VENV"
source "$VENV/bin/activate"
fi
}