From 37c36c2b524c22d3e6ec3e7ea1122431689b76c0 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 15 Oct 2024 15:00:07 +0100 Subject: [PATCH] shell/lisa_shell: Better report which virtual env is disabled FIX Report the actual current $VIRTUAL_ENV being deactivated rather than misleadingly report $LISA_VENV_PATH. Also run the "deactivate" command based on whether $VIRTUAL_ENV is set or not, rather than checking for "deactivate" command existing. --- shell/lisa_shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/lisa_shell b/shell/lisa_shell index 56bc7c724..6c87b106b 100755 --- a/shell/lisa_shell +++ b/shell/lisa_shell @@ -175,8 +175,8 @@ function lisa-venv-activate { } function lisa-venv-deactivate { - if type deactivate &>/dev/null; then - echo "Deactivating LISA Python venv ($LISA_VENV_PATH) ..." + if [[ ! -z "$VIRTUAL_ENV" ]]; then + echo "Deactivating Python venv ($VIRTUAL_ENV) ..." deactivate fi } -- GitLab