From a80a3189458a86f29f61d980b4ad977594199864 Mon Sep 17 00:00:00 2001 From: Ayush Agarwal Date: Wed, 15 Sep 2021 22:47:27 +0530 Subject: Replace 'which' with POSIX equivalent 'command -v' The 'which' command is an external command that must be called each and every time pass is used. 'which' is also not mentioned in the README as one of the dependencies that might be needed to run pass. Instead of 'which', we can use the POSIX compatible and shell built-in 'command -v'. It saves pass from making an external call and is, arguably, more reliable than using 'which' as mentioned in the following link. --- tests/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/setup.sh b/tests/setup.sh index 5d1e794..20dd7ea 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -52,7 +52,7 @@ fi export GNUPGHOME="$TEST_HOME/gnupg/" chmod 700 "$GNUPGHOME" GPG="gpg" -which gpg2 &>/dev/null && GPG="gpg2" +command -v gpg2 &>/dev/null && GPG="gpg2" # We don't want any currently running agent to conflict. unset GPG_AGENT_INFO -- cgit v1.2.3