From 585f655ad39692aed9afa7c683f08b19810ef978 Mon Sep 17 00:00:00 2001 From: Geens Date: Sat, 29 Mar 2025 10:38:25 +0100 Subject: [PATCH] Better error handling when sourcing bootstrap script --- scripts/bootstrap.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 19acf61..21efb4f 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1,21 +1,19 @@ #!/bin/bash -set -eo pipefail # Exit on any error, pipe failures - # Check if required environment variables are set if [ -z "$SIA_REPO_URL" ]; then echo "Error: SIA_REPO_URL environment variable is not set" - exit 1 + return 1 fi if [ -z "$SIA_REPO_USER" ]; then echo "Error: SIA_REPO_USER environment variable is not set" - exit 1 + return 1 fi if [ -z "$SIA_REPO_PAT" ]; then echo "Error: SIA_REPO_PAT environment variable is not set" - exit 1 + return 1 fi # Install required packages