From 32703811b5b28e5bb864dff1674bc6a0ff691a9d Mon Sep 17 00:00:00 2001 From: Peter Abbasi Date: Sat, 28 Dec 2024 13:32:02 -0600 Subject: [PATCH 1/2] Clarify accepted syntax in brew.env files in Homebrew docs Added some clarification on what is and is not supported in brew.env files.. (They are not shell scripts, and do NOT support export commands) Based on discussion here: https://github.com/orgs/Homebrew/discussions/5232#discussioncomment-8919542 (where improvements to docs suggested/welcomed) --- docs/Manpage.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Manpage.md b/docs/Manpage.md index 16536da17bd69..c999ea8b5d82b 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -3545,8 +3545,12 @@ User-specific environment files take precedence over prefix-specific files and prefix-specific files take precedence over system-wide files (unless `HOMEBREW_SYSTEM_ENV_TAKES_PRIORITY` is set, see below). -Note that these files do not support shell variable expansion e.g. `$HOME` or -command execution e.g. `$(cat file)`. +>[!IMPORTANT] +> +>Note that Homebrew's environment files are not shell scripts. +> +>- They do **not** support shell variable expansion, e.g., `$HOME` or command execution, e.g., `$(cat file)`. +>- They **cannot** parse the "`export`" command syntax, and should only contain key-value pairs, e.g., `HOMEBREW_ENV_VAR=VALUE` `HOMEBREW_ALLOWED_TAPS` From a7b65feb9b739f4dde0180ea5d2e4901ec00a3d1 Mon Sep 17 00:00:00 2001 From: Peter Abbasi Date: Sat, 28 Dec 2024 13:38:17 -0600 Subject: [PATCH 2/2] Update Manpage.md --- docs/Manpage.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Manpage.md b/docs/Manpage.md index c999ea8b5d82b..419706d80e82a 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -3549,8 +3549,8 @@ prefix-specific files take precedence over system-wide files (unless > >Note that Homebrew's environment files are not shell scripts. > ->- They do **not** support shell variable expansion, e.g., `$HOME` or command execution, e.g., `$(cat file)`. ->- They **cannot** parse the "`export`" command syntax, and should only contain key-value pairs, e.g., `HOMEBREW_ENV_VAR=VALUE` +>- They do **not** support shell variable expansion, e.g. `$HOME` or command execution, e.g. `$(cat file)`. +>- They **cannot** parse the "`export`" command syntax, and should only contain key-value pairs, e.g. `HOMEBREW_ENV_VAR=VALUE` `HOMEBREW_ALLOWED_TAPS`