From 0337553ca68eb3362551dbe4292e387d6449cab7 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 17 Mar 2026 06:35:20 +1100 Subject: [PATCH 1/2] Fixes #2793 - replace use of [[ conditionals --- output/.gitignore | 1 + plugins/python/venvShellHook.sh | 20 +++++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) create mode 100644 output/.gitignore diff --git a/output/.gitignore b/output/.gitignore new file mode 100644 index 00000000000..a9a5aecf429 --- /dev/null +++ b/output/.gitignore @@ -0,0 +1 @@ +tmp diff --git a/plugins/python/venvShellHook.sh b/plugins/python/venvShellHook.sh index 5e553fa8e6f..84c5ab10ee8 100755 --- a/plugins/python/venvShellHook.sh +++ b/plugins/python/venvShellHook.sh @@ -35,17 +35,15 @@ if [ -d "$VENV_DIR" ]; then echo "Do you want to overwrite it? (y/n)" read reply echo - if [[ $reply =~ ^[Yy]$ ]]; then - echo "Overwriting existing virtual environment..." - create_venv - elif [[ $reply =~ ^[Nn]$ ]]; then - echo "Using your existing virtual environment. We recommend changing \$VENV_DIR to a different location" - touch "$STATE_FILE" - exit 0 - else - echo "Invalid input. Exiting..." - exit 1 - fi + case "$reply" in + [Yy]) echo "Overwriting existing virtual environment..." + create_venv ;; + [Nn]) echo "Using your existing virtual environment. We recommend changing \$VENV_DIR to a different location" + touch "$STATE_FILE" + exit 0 ;; + *) echo "Invalid input. Exiting..." + exit 1 ;; + esac fi else echo "Directory exists but is not a valid virtual environment. Creating a new one..." From 21fdbe3dced6246109601d7a1e0c999ee6006196 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 17 Mar 2026 06:42:21 +1100 Subject: [PATCH 2/2] Delete output/.gitignore Signed-off-by: Tim Gates --- output/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 output/.gitignore diff --git a/output/.gitignore b/output/.gitignore deleted file mode 100644 index a9a5aecf429..00000000000 --- a/output/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tmp