12 lines
271 B
Bash
12 lines
271 B
Bash
hpy() {
|
||
if [ ! -f ".venv/bin/activate" ]; then
|
||
echo "Error: .venv not found in current directory" >&2
|
||
return 1
|
||
fi
|
||
|
||
# Activate venv in a subshell so it doesn’t pollute caller
|
||
(
|
||
source .venv/bin/activate
|
||
python "$@"
|
||
)
|
||
} |