diff options
author | 2024-06-04 03:35:09 +0100 | |
---|---|---|
committer | 2024-06-12 08:06:42 +0100 | |
commit | f8b3029be34143dbd19737aa9bad2948bf0b88c7 (patch) | |
tree | abe84091dd05e9319c025f9f951c695adcde4b72 | |
parent | Don't use ewarn to display a diagnostic in eqatag() (diff) | |
download | gentoo-functions-f8b3029be34143dbd19737aa9bad2948bf0b88c7.tar.gz gentoo-functions-f8b3029be34143dbd19737aa9bad2948bf0b88c7.tar.bz2 gentoo-functions-f8b3029be34143dbd19737aa9bad2948bf0b88c7.zip |
Clean up the jq detection procedure in eqatag()
Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rw-r--r-- | functions.sh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/functions.sh b/functions.sh index 6b4c3fa..f5a59fc 100644 --- a/functions.sh +++ b/functions.sh @@ -194,14 +194,9 @@ eqatag() 0) return 1 ;; - 1) - ;; - *) - if command -v jq >/dev/null; then - genfun_has_jq=1 - else + '') + if ! hash jq 2>/dev/null; [ "$(( genfun_has_jq = $? ))" -eq 0 ]; then warn "eqatag: this function requires that jq be installed" - genfun_has_jq=0 return 1 fi esac |