Skip to main content

We can activate virtualenvs in a not-Git root

ID
e285801
date
2024-01-17 11:46:42+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
9692461
message
We can activate virtualenvs in a not-Git root
changed files
1 file, 1 addition, 1 deletion

Changed files

fish_functions/auto_activate_venv.fish (1688) → fish_functions/auto_activate_venv.fish (1662)

diff --git a/fish_functions/auto_activate_venv.fish b/fish_functions/auto_activate_venv.fish
index 26de318..0db81f1 100644
--- a/fish_functions/auto_activate_venv.fish
+++ b/fish_functions/auto_activate_venv.fish
@@ -15,7 +15,7 @@ function auto_activate_venv --description "Auto activate/deactivate virtualenv w
     # Case #1: cd'd into a folder which has a .venv in its root.
     #
     # Activate this virtualenv if it's not already activated.
-    if test -z "$REPO_ROOT"; and test -d "$(pwd)/.venv"
+    if test -d "$(pwd)/.venv"
         if [ "$VIRTUAL_ENV" != "$(pwd)/.venv" ]
             source "$(pwd)/.venv/bin/activate.fish" &>/dev/null
         end