Skip to content

Commit

Permalink
Merge pull request #162 from stevenxxiu/fix/no-pipenv-or-poetry
Browse files Browse the repository at this point in the history
fix: don't use `$venv_path` if we don't have *Pipenv* or *Poetry* ins…
  • Loading branch information
MichaelAquilina authored Oct 7, 2021
2 parents 74218c1 + 64fad6a commit 6ea1288
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoswitch_virtualenv.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@ function check_venv()
printf "Reason: Found a $AUTOSWITCH_FILE file with weak permission settings ($file_permissions).\n"
printf "Run the following command to fix this: ${PURPLE}\"chmod 600 $venv_path\"${NORMAL}\n"
else
if [[ "$venv_path" == *"/Pipfile" ]] && type "pipenv" > /dev/null; then
if _activate_pipenv; then
if [[ "$venv_path" == *"/Pipfile" ]]; then
if type "pipenv" > /dev/null && _activate_pipenv; then
return
fi
elif [[ "$venv_path" == *"/poetry.lock" ]] && type "poetry" > /dev/null; then
if _activate_poetry; then
elif [[ "$venv_path" == *"/poetry.lock" ]]; then
if type "poetry" > /dev/null && _activate_poetry; then
return
fi
else
Expand Down

0 comments on commit 6ea1288

Please sign in to comment.