Skip to content

Commit

Permalink
tests/git-helper.sh: fix jq checking
Browse files Browse the repository at this point in the history
`[ ! command -v jq &> /dev/null ]` doesn't work for checking the
existing of jq because if enclosed in `[]` it won't check the return
code of `command`.

Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
  • Loading branch information
wainersm committed Jan 30, 2024
1 parent 345b1c4 commit 2306239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/git-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function install_jq() {
}

function configure_github() {
if [ ! command -v jq &> /dev/null ]; then
if ! command -v jq &> /dev/null; then
echo "jq is not installed, installing it"
install_jq
fi
Expand Down

0 comments on commit 2306239

Please sign in to comment.