commit: b601112926e6b29c7e08def3b4e6bf27c8b87072
parent 04cb23acd0367277883e7cdf00033dd8d2451c5a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 11 Feb 2022 19:30:12 +0100
git-hooks/post-update.srht: Better error when SRHT_* are undefined
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/git-hooks/post-update.srht b/git-hooks/post-update.srht
@@ -46,8 +46,10 @@ sub new_job {
};
}
-defined($ENV{SRHT_HOST}) || die;
-defined($ENV{SRHT_TOKEN}) || die;
+if (not (defined($ENV{SRHT_HOST}) && defined($ENV{SRHT_TOKEN})) {
+ print "Environment variables $SRHT_HOST and $SRHT_TOKEN are undefined";
+ exit 1;
+}
if (-d $base . ".work/.builds") {
# TODO: Shuffle manifests, take 4