diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2014-08-07 14:55:15 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2014-08-07 14:55:15 +0000 |
commit | e90d95117b545358cd889b5cd2acd1b673aa7e03 (patch) | |
tree | b5026f6bfefa61c3e805a3f3a946c945f76c7f88 /mason/mason.sh | |
parent | e752380753b9657c60bae790c10f2a0867e56009 (diff) | |
download | definitions-e90d95117b545358cd889b5cd2acd1b673aa7e03.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-x | mason/mason.sh | 5 |
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" |