From a088aaacf2b417831f92c067e2266b0ea81aa6eb Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Wed, 15 Jan 2025 00:11:45 -0500 Subject: [PATCH] pass exit code through script if error --- provision.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/provision.sh b/provision.sh index 96c154f..ceed65b 100755 --- a/provision.sh +++ b/provision.sh @@ -12,8 +12,15 @@ BASEPATH=$2 if [ ! -d "$BASEPATH" ]; then + echo "container-provisioner: building new $FLAVOR at $BASEPATH" debootstrap $FLAVOR "$BASEPATH" + Q=$? + if [ $Q -ne 0 ]; then + echo "debootstrap failed; are you connected to the Internet?" + exit $Q + fi + fi if [ ! -d "$BASEPATH" ]; then