From 735c962a4944cf40e2315ada58f6cab8b9d16726 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 14 Dec 2022 12:13:19 -0500 Subject: 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) 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 ca043de20f62..225d1e31e3ec 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3505,6 +3505,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} -- cgit v1.2.3