diff --git a/bin/detect b/bin/detect index 13ab74ce4..831724e2a 100755 --- a/bin/detect +++ b/bin/detect @@ -15,8 +15,8 @@ BUILD_DIR=$1 # Exit early if app is clearly not Python. -if [ -f "$BUILD_DIR/requirements.txt" ] || [ -f "$BUILD_DIR/setup.py" ] || [ -f "$BUILD_DIR/Pipfile" ] || [ -f "$BUILD_DIR/Pipfile.lock"] || [ -f "$BUILD_DIR/pyproject.py"] || [ -f "$BUILD_DIR/poetry.lock"]; then +if [ -f "$BUILD_DIR/requirements.txt" ] || [ -f "$BUILD_DIR/setup.py" ] || [ -f "$BUILD_DIR/Pipfile" ] || [ -f "$BUILD_DIR/Pipfile.lock" ] || [ -f "$BUILD_DIR/pyproject.toml"] || [ -f "$BUILD_DIR/poetry.lock" ]; then echo Python Project Detected... else exit 1 -fi \ No newline at end of file +fi diff --git a/bin/steps/poetry-python-version b/bin/steps/poetry-python-version index 0c3d30307..3ffb162e7 100644 --- a/bin/steps/poetry-python-version +++ b/bin/steps/poetry-python-version @@ -27,7 +27,7 @@ if [[ -f $BUILD_DIR/pyproject.toml || -f $BUILD_DIR/poetry.lock ]]; then fi else PYTHON=$(sed -nr "/^\[metadata\]/ { :l /^python-versions[ ]*=/ { s/.*=[ ]*//; p; q;}; n; b l;}" "$BUILD_DIR/poetry.lock" | tr -d '"^') - if ! [ -z $PYTHON]; then + if ! [ -z $PYTHON ]; then if [[ "$PYTHON" == +([0-9]).+([0-9]).+([0-9]) ]]; then echo "python-$PYTHON" > "$BUILD_DIR/runtime.txt" elif [ $PYTHON = 2.7 ]; then