From: Nathan Cutler Date: Tue, 3 Sep 2019 13:32:16 +0000 (+0200) Subject: script/ceph-backport.sh: better error message when remote missing X-Git-Tag: v15.1.0~1586^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06bad7addf59abe43cdb77254f7d71b871419ebd;p=ceph.git script/ceph-backport.sh: better error message when remote missing Signed-off-by: Nathan Cutler --- diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index e40ee55ccf1a..c19b65e69174 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -286,9 +286,19 @@ if [ $verbose ] ; then debug "Redmine user: ${redmine_user_id}" debug "GitHub user: ${github_user}" debug "Fork remote: ${github_repo}" - git remote -v | egrep ^${github_repo}\\s+ + if git remote -v | egrep ^${github_repo}\\s+ ; then + true # remote exists; good + else + error "github_repo is set to ->$github_repo<- but this remote does not exist" + exit 1 + fi debug "Ceph remote: ${ceph_repo}" - git remote -v | egrep ^${ceph_repo}\\s+ + if git remote -v | egrep ^${ceph_repo}\\s+ ; then + true # remote exists; good + else + error "ceph_repo is set to ->$ceph_repo<- but this remote does not exist" + exit 1 + fi fi if [[ $1 =~ ^[0-9]+$ ]] ; then