brew.sh: use 'command -v' instead of 'which'

Co-authored-by: Shaun Jackman <sjackman@gmail.com>
This commit is contained in:
Maxim Belkin 2020-08-13 06:59:39 -05:00 committed by GitHub
parent ecbe2213e4
commit bab43d4cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ case "$HOMEBREW_SYSTEM" in
esac
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
if ! which locale &>/dev/null
if ! command -v locale >/dev/null
then
export LC_ALL=C
elif [[ "$(locale charmap 2>/dev/null)" != "UTF-8" ]]