Fail the entrypoint script on any command failure 97/114397/2
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 29 Oct 2020 14:31:12 +0000 (15:31 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Fri, 30 Oct 2020 08:28:11 +0000 (08:28 +0000)
Most importantly this will allowing propagating the
failure to the wrapper script.

Change-Id: I3f419f588e0f0fb5b459fa1d8e8d520b9f5c78d5
Issue-ID: OOM-2615
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
build/docker-entrypoint.sh

index b597dab..7d5f5b2 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+set -eo pipefail
+
 # Set distribution family
 distro_type=$(cat /etc/*-release | grep -w "ID" | awk -F'=' '{ print $2 }' | tr -d '"')
 case "$distro_type" in
@@ -45,7 +47,6 @@ EOF
 }
 
 # Getting input parameters
-POSITIONAL=()
 if [[ $# -eq 0 ]] ; then
     help # show help
     exit 0