Skip to content

Commit

Permalink
fix(poetry-env): do not deactivate in a subdir
Browse files Browse the repository at this point in the history
Closes #12377
  • Loading branch information
carlosala committed Apr 23, 2024
1 parent ee69c14 commit 5d2d35c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/poetry-env/poetry-env.plugin.zsh
Expand Up @@ -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
Expand Down

1 comment on commit 5d2d35c

@offby1
Copy link

@offby1 offby1 commented on 5d2d35c Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! I'd uninstalled the plugin precisely because of this bug. I'm trying it again now.

Please sign in to comment.