fix(poetry-env): scope venv_dir to the activation function (#14043)

This commit is contained in:
Robby Russell
2026-09-07 09:55:47 +02:00
committed by GitHub
parent 704f7d59d8
commit 17bbf5fdac
+1 -1
View File
@@ -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"