git: e093c61b2d69 - main - freebsd-update: avoid effects of user's environment on grep
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Mar 2023 16:04:08 UTC
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e093c61b2d69e9cca54a2332096c0e36f97bffc0 commit e093c61b2d69e9cca54a2332096c0e36f97bffc0 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2022-12-14 17:13:19 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-03-01 16:02:54 +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 MFC after: 3 days Sponsored by: The FreeBSD Foundation --- 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 078043326115..b6cd241c4a48 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3492,6 +3492,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}