Skip to content

Commit 0751a04

Browse files
committed
chore: Coderabbit INSTALL_ALL validation
1 parent db8b255 commit 0751a04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile.tools

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ARG TRIVY_VERSION=${TRIVY_VERSION:-false}
5353
# In RUN command below used `. /.env` <- this is sourcing vars that
5454
# specified in step below
5555
ARG INSTALL_ALL=${INSTALL_ALL:-false}
56-
RUN if [ "$INSTALL_ALL" != "false" ]; then \
56+
RUN if [ "$INSTALL_ALL" = "true" ] || [ "$INSTALL_ALL" - "latest" ]; then \
5757
echo "OPENTOFU_VERSION=latest" >> /.env && \
5858
echo "TERRAFORM_VERSION=latest" >> /.env && \
5959
\
@@ -67,6 +67,8 @@ RUN if [ "$INSTALL_ALL" != "false" ]; then \
6767
echo "TFSEC_VERSION=latest" >> /.env && \
6868
echo "TFUPDATE_VERSION=latest" >> /.env && \
6969
echo "TRIVY_VERSION=latest" >> /.env \
70+
elif [ "$INSTALL_ALL" != "false"]; then \
71+
echo "ERROR: INSTALL_ALL must be 'true', 'latest', or 'false'" >&2 && exit 1; \
7072
; fi
7173

7274
# Docker `RUN`s shouldn't be consolidated here

0 commit comments

Comments
 (0)