Return error if docker install script fails
PATCH 1/1 Return error if docker install script fails
Before this patch, install.sh would return 0 even if fuego-host-scripts/docker-build-image.sh (that's sourced in it) failed, what could possibly mislead a script or program that depends on its return.
By using 'set -e' we make sure that any failure inside its sourced scripts is propagated, aborting the execution and returning the proper error code.
Signed-off-by Guilherme Campos Camargo <[email protected]>
--- install.sh | 4 ++++ 1 file changed, 4 insertions(+)
install.sh +4 -0
@@ -1,2 +1,6 @@ +#!/bin/bash + +set -e + source fuego-host-scripts/docker-build-image.sh $1 sudo /bin/sh -c "if [ -f /etc/ttc.conf -a ! -f fuego-ro/conf/ttc.conf ] ; then cp /etc/ttc.conf fuego-ro/conf/ttc.conf ; fi"
Signature · 1 line
2.16.2