From e90d95117b545358cd889b5cd2acd1b673aa7e03 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 7 Aug 2014 14:55:15 +0000 Subject: Detect lack of network and report as such, rather than fail If the git remote update command fails, we assume it's because we are unable to connect to the trove. This gets reported as a networking issue, rather than as a failure. --- mason/mason.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mason/mason.sh') diff --git a/mason/mason.sh b/mason/mason.sh index dfed71f7..1fdcf2de 100755 --- a/mason/mason.sh +++ b/mason/mason.sh @@ -22,7 +22,10 @@ else SHA1_PREV="$(git rev-parse HEAD)" fi -git remote update origin +if ! git remote update origin; then + echo ERROR: Unable to contact trove + exit 42 +fi git clean -fxd git reset --hard origin/"$DEFINITIONS_REF" -- cgit v1.2.1