Skip to content

Commit 4681d3e

Browse files
committed
fix(airflow): Make the download_constraints.sh script stop on command failure and treat 404 as an error.
1 parent 36dcb1d commit 4681d3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

airflow/download_constraints.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22

3+
set -euo pipefail
4+
35
AIRFLOW_VERSION=${1:?"Missing version number argument (arg 1)"}
46
PYTHON_VERSION=${2:-"3.9"}
57

@@ -11,7 +13,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1113
pushd "${DIR}" > /dev/null || exit 1
1214

1315
echo "Downloading constraints file for Airflow ${AIRFLOW_VERSION} (Python ${PYTHON_VERSION})"
14-
curl --fail -Ls "${URL}" -o "${FILENAME}"
16+
curl --fail -LSs "${URL}" -o "${FILENAME}"
1517

1618
echo "Successfully pulled new constraints file: ${FILENAME}"
1719
popd > /dev/null || exit 1

0 commit comments

Comments
 (0)