From 00a49bf8e1d35e653047850881ccc6ddf699bb0f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 12 Sep 2025 08:30:12 +0100 Subject: [PATCH] cmd/shellenv: echo path helper command rather than run it. This is faster at both execution and `eval`ing than the existing version and aids caching. --- Library/Homebrew/cmd/shellenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index 9b48ffab1d..df5ad65fb3 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -50,7 +50,7 @@ homebrew-shellenv() { echo "setenv HOMEBREW_REPOSITORY ${HOMEBREW_REPOSITORY};" if [[ -n "${PATH_HELPER_ROOT}" ]] then - PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" PATH="${HOMEBREW_PATH}" /usr/libexec/path_helper -c + echo "PATH_HELPER_ROOT=\"${PATH_HELPER_ROOT}\" /usr/libexec/path_helper -c" else echo "setenv PATH ${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin:\$PATH;" fi @@ -75,7 +75,7 @@ homebrew-shellenv() { fi if [[ -n "${PATH_HELPER_ROOT}" ]] then - PATH_HELPER_ROOT="${PATH_HELPER_ROOT}" PATH="${HOMEBREW_PATH}" /usr/libexec/path_helper -s + echo "PATH_HELPER_ROOT=\"${PATH_HELPER_ROOT}\" /usr/libexec/path_helper -s" else echo "export PATH=\"${HOMEBREW_PREFIX}/bin:${HOMEBREW_PREFIX}/sbin\${PATH+:\$PATH}\";" fi