From de8230b9ef42353d90a8f8fb2a36f95b408e87e9 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 15 Oct 2024 15:47:02 +0100 Subject: [PATCH] shell/lisa_shell: Accomodate vscode wonky venv support FEATURE VScode provides its own version of venv deactivate scripts that start starts a bash shell at the end. Ensure this shell exits. --- shell/lisa_shell | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/lisa_shell b/shell/lisa_shell index 6c87b106b..c89e36218 100755 --- a/shell/lisa_shell +++ b/shell/lisa_shell @@ -177,7 +177,9 @@ function lisa-venv-activate { function lisa-venv-deactivate { if [[ ! -z "$VIRTUAL_ENV" ]]; then echo "Deactivating Python venv ($VIRTUAL_ENV) ..." - deactivate + # Under vscode, deactivate starts a bash process at the end, so we want + # it to exit. Normal deactivate script ignores stdin. + echo 'exit 0' | deactivate fi } -- GitLab