git: 2004a768e44c - stable/12 - freebsd-update: avoid effects of user's environment on grep
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Jun 2023 12:58:35 UTC
The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2004a768e44c37a3d0d9602fa66bf139e86da1c4 commit 2004a768e44c37a3d0d9602fa66bf139e86da1c4 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-12-14 17:13:19 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-06-21 12:54:37 +0000 freebsd-update: avoid effects of user's environment on grep A user had GREP_OPTIONS containing --color=always, which broke grep use in freebsd-update. Unset this environment variable. PR: 255990 Reviewed by: kevans Approved by: re (cperciva, expedited MFC) Sponsored by: The FreeBSD Foundation (cherry picked from commit e093c61b2d69e9cca54a2332096c0e36f97bffc0) (cherry picked from commit 24fe8a518324e291b9ea3fe4e60f2e0fb4f857c5) --- usr.sbin/freebsd-update/freebsd-update.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 9743cd652d16..cad1b9d617fd 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3484,6 +3484,9 @@ fi # Set LC_ALL in order to avoid problems with character ranges like [A-Z]. export LC_ALL=C +# Clear environment variables that may affect operation of tools that we use. +unset GREP_OPTIONS + get_params $@ for COMMAND in ${COMMANDS}; do cmd_${COMMAND}