1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
Subject: Replace usage of which(1)
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Date: 2021-12-01
Forwarded: https://github.com/latchset/jose/issues/108
--- a/tests/jose-jwe-enc
+++ b/tests/jose-jwe-enc
@@ -15,7 +15,7 @@
jwe=$tmpdir/jwe
jqopt() {
- if ! which jq >/dev/null 2>&1; then
+ if ! command -v jq >/dev/null 2>&1; then
echo "$3"
else
jq -r "if $2 | type | . = \"string\" then $2 else error(\"\") end" < $1
@@ -23,7 +23,7 @@
}
jqbopt() {
- if ! which jq >/dev/null 2>&1; then
+ if ! command -v jq >/dev/null 2>&1; then
echo "$4"
else
jq -r "if $2 | type | . = \"string\" then $2 else error(\"\") end" < $1 \
|