Fix a bug in auto_enable_venv.fish
- ID
d187634- date
2023-11-26 02:52:16+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
665bd16- message
Fix a bug in auto_enable_venv.fish- changed files
1 file, 2 additions, 2 deletions
Changed files
fish_functions/auto_enable_venv.fish (1133) → fish_functions/auto_enable_venv.fish (1128)
diff --git a/fish_functions/auto_enable_venv.fish b/fish_functions/auto_enable_venv.fish
index adf6c1b..635aa13 100644
--- a/fish_functions/auto_enable_venv.fish
+++ b/fish_functions/auto_enable_venv.fish
@@ -13,7 +13,7 @@ function auto_enable_venv
# (e.g. we've switched from a Git repo to another directory).
# Otherwise there's nothing to do.
if [ "$REPO_ROOT" = "" ]
- if test -n "$VIRTUAL_ENV"
+ if [ -n "$VIRTUAL_ENV" ]
deactivate
end
end
@@ -25,7 +25,7 @@ function auto_enable_venv
return
end
- if [ test -d "$REPO_ROOT/.venv"]
+ if [ -d "$REPO_ROOT/.venv" ]
source "$REPO_ROOT/.venv/bin/activate.fish" &>/dev/null
end
end