From d5730371d755c4ed7c9b76354dea83334759289c Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Thu, 13 Aug 2020 15:38:37 +0000 Subject: [PATCH] script/ceph-backport.sh: Check if jq is installed If you tried to setup ceph-backport.sh without having 'jq' installed, you would get a totally unrelated error message and it was hard to figure out the problem. Signed-off-by: Tiago Melo --- src/script/ceph-backport.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 5bfa7cb1f62..5a9882baa33 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -1401,6 +1401,18 @@ else fi +# +# is jq available? +# + +if command -v jq >/dev/null ; then + debug "jq is available. Good." +else + error "This script needs \"jq\" in order to work, and it is not available" + abort_due_to_setup_problem +fi + + # # process command-line arguments # -- 2.47.3