git: 24fe8a518324 - stable/13 - freebsd-update: avoid effects of user's environment on grep

From: Ed Maste <>
Date: Thu, 02 Mar 2023 18:31:11 UTC
The branch stable/13 has been updated by emaste:


commit 24fe8a518324e291b9ea3fe4e60f2e0fb4f857c5
Author:     Ed Maste <>
AuthorDate: 2022-12-14 17:13:19 +0000
Commit:     Ed Maste <>
CommitDate: 2023-03-02 18:30: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
    Approved by:    re (cperciva, expedited MFC)
    Sponsored by:   The FreeBSD Foundation
    (cherry picked from commit e093c61b2d69e9cca54a2332096c0e36f97bffc0)
 usr.sbin/freebsd-update/ | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/usr.sbin/freebsd-update/ b/usr.sbin/freebsd-update/
index ca043de20f62..225d1e31e3ec 100644
--- a/usr.sbin/freebsd-update/
+++ b/usr.sbin/freebsd-update/
@@ -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.
 get_params $@
 for COMMAND in ${COMMANDS}; do