From 5d2d35cd1741af19553007fe0cc5324744fc58fa Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Tue, 23 Apr 2024 16:21:21 +0200 Subject: [PATCH] fix(poetry-env): do not deactivate in a subdir Closes #12377 --- 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 f98c177b4..be46717d8 100644 --- a/plugins/poetry-env/poetry-env.plugin.zsh +++ b/plugins/poetry-env/poetry-env.plugin.zsh @@ -6,7 +6,7 @@ _togglePoetryShell() { fi # Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory - if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] || [[ "$PWD" != "$poetry_dir"* ]]; }; then + if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] && [[ "$PWD" != "$poetry_dir"* ]]; }; then export poetry_active=0 unset poetry_dir deactivate