From d8d6b4d70a09cb78eab6f524e1e448a2a84cc155 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 12 Dec 2017 23:11:51 -0800 Subject: [PATCH] python: only override virtualenvwrapper python when needed Fixes #1519 --- modules/autosuggestions/external | 2 +- modules/python/init.zsh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/autosuggestions/external b/modules/autosuggestions/external index 9f9237ab..15931f04 160000 --- a/modules/autosuggestions/external +++ b/modules/autosuggestions/external @@ -1 +1 @@ -Subproject commit 9f9237ab8a530eeff389161202bbc7283ad6af3e +Subproject commit 15931f04ffac91a2f9a1a044b6b3ee4050751064 diff --git a/modules/python/init.zsh b/modules/python/init.zsh index 365efc48..68c8c895 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -115,16 +115,16 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) && \ # Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if available # in '$path' or in an alternative location on a Debian based system. # - # If the python-path was manually specified, use that. Otherwise, fall back - # to python3 then python2 in that order. This is needed to fix an issue with - # virtualenvwrapper when used with homebrew, as it no longer shadows the - # system python. + # If the python-path was manually specified, use that. Otherwise, if + # homebrew is installed we fall back to python3 then python2 in that + # order. This is needed to fix an issue with virtualenvwrapper as homebrew + # no longer shadows the system python. zstyle -s ':prezto:module:python:virtualenvwrapper' python-path '_venv_python' if [[ -n "$_venv_python" ]]; then export VIRTUALENVWRAPPER_PYTHON=$_venv_python - elif (( $+commands[python3] )); then + elif (( $+commands[brew] )) && (( $+commands[python3] )); then export VIRTUALENVWRAPPER_PYTHON=$commands[python3] - elif (( $+commands[python2] )); then + elif (( $+commands[brew] )) && (( $+commands[python2] )); then export VIRTUALENVWRAPPER_PYTHON=$commands[python2] fi