suppress error if already deactivated

This commit is contained in:
Alex Rosenfeld 2024-09-27 12:03:50 -04:00 committed by GitHub
commit f12a993bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ _togglePoetryShell() {
if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] && [[ "$PWD" != "$poetry_dir"* ]]; }; then
export poetry_active=0
unset poetry_dir
deactivate
deactivate 2>/dev/null
fi
# Activate the environment if in a Poetry directory and no environment is currently active