From 29aeefeba15bc9f5e593dc328acf2bacc09280aa Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Tue, 26 Sep 2017 09:49:41 -0400 Subject: [PATCH] improvements to pipenv python version detection Signed-off-by: Kenneth Reitz <me@kennethreitz.org> --- bin/steps/pipenv-python-version | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/steps/pipenv-python-version b/bin/steps/pipenv-python-version index ddc98259..074d7931 100755 --- a/bin/steps/pipenv-python-version +++ b/bin/steps/pipenv-python-version @@ -11,9 +11,12 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then if [[ -f $BUILD_DIR/Pipfile.lock ]]; then set +e PYTHON=$(jq -r '._meta.requires.python_full_version' "$BUILD_DIR/Pipfile.lock") + if [[ "$PYTHON" != "null" ]]; then + echo "$PYTHON" > "$BUILD_DIR/runtime.txt" + fi set -e - if [[ ! "$PYTHON" ]]; then + if [[ "$PYTHON" != "null" ]]; then PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock") if [ "$PYTHON" = 2.7 ]; then echo "python-2.7.14" > "$BUILD_DIR/runtime.txt" -- GitLab