fix(poetry-env): do not deactivate in a subdir

Closes #12377
This commit is contained in:
Carlo Sala 2024-04-23 16:21:21 +02:00
parent ee69c14beb
commit 5d2d35cd17
No known key found for this signature in database
GPG Key ID: DA6FB450C1A4FE9A

View File

@ -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