summaryrefslogtreecommitdiff
path: root/mason/mason.sh
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2014-08-07 14:55:15 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2014-08-07 14:55:15 +0000
commite90d95117b545358cd889b5cd2acd1b673aa7e03 (patch)
treeb5026f6bfefa61c3e805a3f3a946c945f76c7f88 /mason/mason.sh
parente752380753b9657c60bae790c10f2a0867e56009 (diff)
downloaddefinitions-baserock/michaeldrake/mason-net-down-report.tar.gz
Detect lack of network and report as such, rather than failbaserock/michaeldrake/mason-net-down-report
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.
Diffstat (limited to 'mason/mason.sh')
-rwxr-xr-xmason/mason.sh5
1 files changed, 4 insertions, 1 deletions
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"