use command -v over which

command is more portable

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
This commit is contained in:
Ashley Davis 2022-05-11 15:22:02 +01:00
parent 7c5e5d6f65
commit a15b662b92
No known key found for this signature in database
GPG Key ID: DD14CC017E32BEB1

View File

@ -25,7 +25,7 @@ TAGS=$(mktemp)
trap 'rm -f -- "$TAGS"' EXIT
if ! which $CRANE >/dev/null 2>&1; then
if ! command -v $CRANE >/dev/null 2>&1; then
echo -e "Couldn't find crane. Try running:\ngo install github.com/google/go-containerregistry/cmd/crane@latest" >&2
exit 1
fi