feat(venv): make activate-venv script respect VENV_PATH and auto-create venv with uv
This commit is contained in:
1 file changed
+6
-4
+6
-4
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user