From b0f966ae48591adf07c8261b6881e87571c97cd0 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Mon, 24 Jun 2019 15:33:42 +0200 Subject: [PATCH] Check number of arguments for 'audit dockerfile' --- include/parameters | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/parameters b/include/parameters index f3845526..53eeecb3 100644 --- a/include/parameters +++ b/include/parameters @@ -36,12 +36,13 @@ if [ $# -gt 1 ]; then case $2 in "dockerfile") - if [ "$3" = "" ]; then + if [ $# = 2 ]; then echo "${RED}Error: ${WHITE}Missing file name or URL${NORMAL}" - echo "Example: $0 audit dockerfile /root/Dockerfile" + echo "Example: $0 audit dockerfile /path/to/Dockerfile" ExitFatal else shift; shift + CHECK_BINARIES=1 HELPER_PARAMS="$1" HELPER="audit_dockerfile" break