Skip to content

Commit

Permalink
src/script/ceph-backport.sh: abort if jq not available
Browse files Browse the repository at this point in the history
This commit improves the error message displayed by the
script when the user tries to run in in an environment where
jq is missing.

Signed-off-by: Nathan Cutler <[email protected]>
  • Loading branch information
smithfarm committed Nov 3, 2020
1 parent 30da5ce commit 3e9aae7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/script/ceph-backport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -e

full_path="$0"

SCRIPT_VERSION="15.1.1.389"
SCRIPT_VERSION="16.0.0.6848"
active_milestones=""
backport_pr_labels=""
backport_pr_number=""
Expand Down Expand Up @@ -1400,6 +1400,16 @@ else
abort_due_to_setup_problem
fi

#
# do we have jq available?
#

if type jq >/dev/null 2>&1 ; then
debug "jq is available. Good."
else
error "This script uses jq, but it does not seem to be installed"
abort_due_to_setup_problem
fi

#
# is jq available?
Expand Down

0 comments on commit 3e9aae7

Please sign in to comment.