From afa3e8989001f301fb9c8ee38aa24aa6548c1b8b Mon Sep 17 00:00:00 2001 From: Christof Schulze Date: Wed, 21 Aug 2019 23:48:06 +0200 Subject: [PATCH] scripts/update.sh: add verbose error message when commit cannot be found (#1794) This displays the branch, repo and commitID that was attempted to update to but failed. Users then can compare this output to the configuration they meant to activate in modules and hopefully better find their typos. --- scripts/update.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/update.sh b/scripts/update.sh index 99a7e409..afea8e71 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -20,6 +20,9 @@ for module in $GLUON_MODULES; do if ! git branch -f base "$commit" 2>/dev/null; then git fetch "$repo" "$branch" - git branch -f base "$commit" + git branch -f base "$commit" || { + echo "unable to find commit \"$commit\" on branch \"$branch\" in repo \"$repo\"." >&2 + exit 1 + } fi done