From cdbe639fe621efaac9c2880b1da950ea312c75f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Tue, 19 Jun 2018 09:18:59 +0200 Subject: [PATCH] Check if gitlab exists in git-replay-merge.sh{ --- util/git-replay-merge.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/util/git-replay-merge.sh b/util/git-replay-merge.sh index 81ee5c4eee..9fa408e577 100644 --- a/util/git-replay-merge.sh +++ b/util/git-replay-merge.sh @@ -31,6 +31,13 @@ die_with_usage() { " ${SELF} --abort" } +verify_gitlab_cli() { + which gitlab >/dev/null 2>&1 || \ + die "You need to have gitlab cli installed and configured: "\ + "" \ + "$ gem install --user-install gitlab" +} + die_with_continue_instructions() { die "" \ "Replay interrupted. Conflicts need to be fixed manually." \ @@ -176,6 +183,7 @@ case "$1" in cleanup ;; "--continue") + verify_gitlab_cli die_if_not_in_progress source "${STATE_FILE}" resume @@ -184,6 +192,7 @@ case "$1" in if [[ $# -ne 3 ]]; then die_with_usage fi + verify_gitlab_cli die_if_in_progress go "$@" ;;