From 4f03226a106d017e14d64af4f7d837a1a07b7550 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 11 Sep 2024 02:23:26 +0800 Subject: [PATCH] shellenv: silence errors from writing to `HOMEBREW_PATHS_FILE` Fixes #18301. --- Library/Homebrew/cmd/shellenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index bd4f915b73a02..79934853b3570 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -26,7 +26,7 @@ homebrew-shellenv() { if [[ ! -f "${HOMEBREW_PATHS_FILE}" ]] then - printf '%s/bin\n%s/sbin\n' "${HOMEBREW_PREFIX}" "${HOMEBREW_PREFIX}" >"${HOMEBREW_PATHS_FILE}" 2>/dev/null + printf '%s/bin\n%s/sbin\n' "${HOMEBREW_PREFIX}" "${HOMEBREW_PREFIX}" 2>/dev/null >"${HOMEBREW_PATHS_FILE}" fi if [[ -r "${HOMEBREW_PATHS_FILE}" ]]