From 57e860b11a681e1ce03eb67a4dbfc3eafbc13002 Mon Sep 17 00:00:00 2001 From: Andre Jasiskis Date: Mon, 27 Jul 2020 12:36:40 +0100 Subject: [PATCH] fix: python autodetection in containerized env python on containerized env will auto detects only if file is not provided --- docker/docker-python-entrypoint.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docker/docker-python-entrypoint.sh b/docker/docker-python-entrypoint.sh index 12f64a349f..fd88721821 100755 --- a/docker/docker-python-entrypoint.sh +++ b/docker/docker-python-entrypoint.sh @@ -59,15 +59,17 @@ if [ -n "${TARGET_FILE}" ]; then esac fi -if [ -f "${PROJECT_PATH}/requirements.txt" ]; then - echo "Found requirement.txt" - installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt" -elif [ -f "${PROJECT_PATH}/setup.py" ]; then - echo "Found setup.py" - pip install -U -e "${PROJECT_PATH}" -elif [ -f "${PROJECT_PATH}/Pipfile" ]; then - echo "Found Pipfile" - installPipfileDeps +if [ -z "${TARGET_FILE}" ]; then + if [ -f "${PROJECT_PATH}/requirements.txt" ]; then + echo "Found requirement.txt" + installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt" + elif [ -f "${PROJECT_PATH}/setup.py" ]; then + echo "Found setup.py" + pip install -U -e "${PROJECT_PATH}" + elif [ -f "${PROJECT_PATH}/Pipfile" ]; then + echo "Found Pipfile" + installPipfileDeps + fi fi bash docker-entrypoint.sh "$@"