From 34c6439b83b852a7afda6144d507c08b523c6e5d Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Wed, 28 Feb 2018 10:07:41 -0500 Subject: [PATCH] [provisioning] Fix pyenv installation under OSX --- recipes/python | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/recipes/python b/recipes/python index d09f0f5..89c116f 100644 --- a/recipes/python +++ b/recipes/python @@ -3,6 +3,8 @@ set -e __PYTHON_VERSION=3.6.4 +_recipe _path + case $_PLATFORM in darwin) _recipe brew @@ -19,13 +21,13 @@ case $_PLATFORM in if [ ! -d ~/.pyenv ]; then _run "Install pyenv" bash <(curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer) fi - _recipe _path _path "${HOME}/.pyenv/bin" - _profile 'eval "$(pyenv init -)"' - _profile 'eval "$(pyenv virtualenv-init -)"' ;; esac +_profile 'eval "$(pyenv init -)"' +_profile 'eval "$(pyenv virtualenv-init -)"' + if ! [ -d ~/.pyenv/versions/${__PYTHON_VERSION} ]; then _run "Install python ${__PYTHON_VERSION}" pyenv install ${__PYTHON_VERSION} fi