mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
small fix
This commit is contained in:
parent
a561e32998
commit
d43f5b09f7
1 changed files with 2 additions and 2 deletions
|
|
@ -6,14 +6,14 @@ _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" == 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
|
export poetry_active=0
|
||||||
unset poetry_dir
|
unset poetry_dir
|
||||||
deactivate
|
deactivate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Activate the environment if in a Poetry directory and no environment is currently active
|
# Activate the environment if in a Poetry directory and no environment is currently active
|
||||||
if [[ $in_poetry_dir -eq 1 ]] && [[ "$poetry_active" != 1 ]]; then
|
if [[ $in_poetry_dir -eq 1 ]] && [[ $poetry_active -ne 1 ]]; then
|
||||||
venv_dir=$(poetry env info --path 2>/dev/null)
|
venv_dir=$(poetry env info --path 2>/dev/null)
|
||||||
if [[ -n "$venv_dir" ]]; then
|
if [[ -n "$venv_dir" ]]; then
|
||||||
export poetry_active=1
|
export poetry_active=1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue