Bailout when there is not enough input arguments

Currently the code carries on even missing required arguments.
This commit is contained in:
Xueshan Feng 2019-08-08 11:49:56 -07:00 committed by GitHub
parent 56eeaf41e6
commit 06638fa4c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -15,8 +15,9 @@
#!/bin/bash #!/bin/bash
set -e set -e
if [ $# -lt 3 ]; if [ $# -lt 3 ]; then
then echo "Usage: run_in_docker.sh <path to Dockerfile> <context directory> <image tag> <cache>" echo "Usage: run_in_docker.sh <path to Dockerfile> <context directory> <image tag> <cache>"
exit 1
fi fi
dockerfile=$1 dockerfile=$1