From 17bbf5fdac15c2e019203236c5557bff014a5782 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 7 Sep 2026 00:55:47 -0700 Subject: [PATCH] fix(poetry-env): scope venv_dir to the activation function (#14043) --- plugins/poetry-env/poetry-env.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/poetry-env/poetry-env.plugin.zsh b/plugins/poetry-env/poetry-env.plugin.zsh index 5949a048e..57695edb8 100644 --- a/plugins/poetry-env/poetry-env.plugin.zsh +++ b/plugins/poetry-env/poetry-env.plugin.zsh @@ -23,7 +23,7 @@ _togglePoetryShell() { # Activate the environment if in a Poetry directory and no environment is currently active if [[ $in_poetry_dir -eq 1 ]] && [[ $poetry_active -ne 1 ]]; then - venv_dir=$(poetry env info --path 2>/dev/null) + local venv_dir=$(poetry env info --path 2>/dev/null) # Handle case where poetry returns "." for in-project virtual environments if [[ "$venv_dir" == "." ]]; then venv_dir="$PWD/.venv"