Skip to content

Commit 825c851

Browse files
committed
Bash strict mode
1 parent 196abc2 commit 825c851

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aws-cli/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG USER_NAME=default
66
ARG USER_HOME=/home/default
77
ARG USER_ID=1000
88

9-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
9+
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
1010

1111
# Upgrade python to 3.8 (best we can do with Amazon Linux 2)
1212
RUN yum remove python3 \
@@ -24,7 +24,7 @@ RUN yum update -y \
2424
tar-1.26-35.amzn2.0.4 \
2525
unzip-6.0-57.amzn2.0.1 \
2626
zip-3.0-11.amzn2.0.2 \
27-
&& if yum list updates | grep -q -e '^Updated Packages' ; then \
27+
&& IFS=$'\n\t' if yum list updates | grep -q -e '^Updated Packages' ; then \
2828
yum list updates ; \
2929
exit 1 ; \
3030
fi \
@@ -35,7 +35,7 @@ RUN yum update -y \
3535
# @TL FIXME: --break-system-packages not supported until Python 3.11.
3636
RUN pip3 install --no-cache-dir --upgrade \
3737
cfn-policy-validator==0.0.29 \
38-
&& msg="$(pip3 list --outdated | grep -i -e '^cfn-policy-validator ' || true)" \
38+
&& IFS=$'\n\t' msg="$(pip3 list --outdated | grep -i -e '^cfn-policy-validator ' || true)" \
3939
&& if [ -n "${msg}" ]; then \
4040
>&2 echo "ERROR: outdated: ${msg}" ; \
4141
exit 1 ; \

0 commit comments

Comments
 (0)