Update brew.sh: hide printf's stderr in numeric()

Avoid #6721 and similar confusing messages during version comparison by hiding printf's stderr (printf woks anyway).
This commit is contained in:
Evgenii Terechkov 2019-11-11 20:31:59 +07:00 committed by GitHub
parent 20cf2afede
commit 8bf9bbfd1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ git() {
numeric() {
# Condense the exploded argument into a single return value.
# shellcheck disable=SC2086,SC2183
printf "%01d%02d%02d%03d" ${1//[.rc]/ }
printf "%01d%02d%02d%03d" ${1//[.rc]/ } 2>/dev/null
}
HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty --abbrev=7 2>/dev/null)"