5d2d35cd1741af19553007fe0cc5324744fc58fa
- Author
- Carlo Sala <carlosalag@protonmail.com>
- Committer
- Carlo Sala <carlosalag@protonmail.com>
- Date
Message
fix(poetry-env): do not deactivate in a subdir
Closes #12377
Diff
1diff --git a/plugins/poetry-env/poetry-env.plugin.zsh b/plugins/poetry-env/poetry-env.plugin.zsh
2index f98c177b4eaff11e50ad5f933b34e15694bba6c3..be46717d8f5b67ffa1b1b84233b0138065fb8c1e 100644
3--- a/plugins/poetry-env/poetry-env.plugin.zsh
4+++ b/plugins/poetry-env/poetry-env.plugin.zsh
5@@ -6,7 +6,7 @@ _togglePoetryShell() {
6 fi
7
8 # Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory
9- if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] || [[ "$PWD" != "$poetry_dir"* ]]; }; then
10+ if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] && [[ "$PWD" != "$poetry_dir"* ]]; }; then
11 export poetry_active=0
12 unset poetry_dir
13 deactivate