mirror of https://github.com/ohmyzsh/ohmyzsh.git
fix(poetry-env): switch venv between poetry dirs (#12804)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>pull/12806/head
parent
7ed475cb58
commit
ca5471fe49
|
@ -6,8 +6,7 @@ _togglePoetryShell() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deactivate the current environment if moving out of a Poetry directory or into a different Poetry directory
|
# 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 ]] \
|
if [[ $poetry_active -eq 1 ]] && { [[ $in_poetry_dir -eq 0 ]] || [[ "$PWD" != "$poetry_dir"* ]]; }; then
|
||||||
&& [[ "$PWD" != "$poetry_dir"* ]]; then
|
|
||||||
export poetry_active=0
|
export poetry_active=0
|
||||||
unset poetry_dir
|
unset poetry_dir
|
||||||
(( $+functions[deactivate] )) && deactivate
|
(( $+functions[deactivate] )) && deactivate
|
||||||
|
|
Loading…
Reference in New Issue