Commit 41d1f83c authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Add upgrade support for pydevenv* aliases

parent ccebcb3a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ _venv_make_func() {

_venv_enable() {
	local venv=.venv${1}-${2} python=$3
	[[ -d "$venv" ]] || $python -m venv "$venv"
	[[ -f "$venv/bin/activate" ]] || $python -m venv "$venv"
	[[ -x "$venv/bin/$python" ]] || $python -m venv --upgrade "$venv"
	[[ -v VIRTUAL_ENV ]] && has deactivate is function && deactivate
	source "$venv/bin/activate"
	export CONTEXT_PY=$1