summaryrefslogtreecommitdiff
path: root/plugins/poetry-env
diff options
context:
space:
mode:
authorKate Sullivan <75387802+katesullivan@users.noreply.github.com>2024-11-14 02:00:48 -0600
committerGitHub <noreply@github.com>2024-11-14 09:00:48 +0100
commitca5471fe496f00007727fd26db762d19519c2e8f (patch)
treec4b1093b122ea3868aab3018d9d26897b3bc0c96 /plugins/poetry-env
parent7ed475cb589c9e82211f71b3a5d7083b69cea93c (diff)
downloadzsh-ca5471fe496f00007727fd26db762d19519c2e8f.tar.gz
zsh-ca5471fe496f00007727fd26db762d19519c2e8f.tar.bz2
zsh-ca5471fe496f00007727fd26db762d19519c2e8f.zip
fix(poetry-env): switch venv between poetry dirs (#12804)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
Diffstat (limited to 'plugins/poetry-env')
-rw-r--r--plugins/poetry-env/poetry-env.plugin.zsh3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/poetry-env/poetry-env.plugin.zsh b/plugins/poetry-env/poetry-env.plugin.zsh
index dd52b1655..dca388dfe 100644
--- a/plugins/poetry-env/poetry-env.plugin.zsh
+++ b/plugins/poetry-env/poetry-env.plugin.zsh
@@ -6,8 +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
(( $+functions[deactivate] )) && deactivate