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
This commit is contained in:
Ed Maste 2022-12-14 12:13:19 -05:00
parent 1b00334852
commit e093c61b2d

View File

@ -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}