pass exit code through script if error

This commit is contained in:
Michael Becker 2025-01-15 00:11:45 -05:00
parent 14d5df15fc
commit a088aaacf2

View File

@ -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