From 48e71f06238680e35ad4be083c5a9b869f751ebe Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Mon, 17 May 2021 20:16:59 +0530 Subject: [PATCH] Replace `which` command ( non standard) with `command -v` builtin Signed-off-by: Humble Chirammal --- verify-shellcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verify-shellcheck.sh b/verify-shellcheck.sh index fd28021a..664b919a 100755 --- a/verify-shellcheck.sh +++ b/verify-shellcheck.sh @@ -84,7 +84,7 @@ done < <(find . -name "*.sh" \ # detect if the host machine has the required shellcheck version installed # if so, we will use that instead. HAVE_SHELLCHECK=false -if which shellcheck &>/dev/null; then +if command -v shellcheck &>/dev/null; then detected_version="$(shellcheck --version | grep 'version: .*')" if [[ "${detected_version}" = "version: ${SHELLCHECK_VERSION}" ]]; then HAVE_SHELLCHECK=true