Documentation for ~/.homebrew/brew.env incorrect? #6221
Replies: 1 comment 1 reply
-
Thanks for the clear breakdown, @jcwren — you're absolutely right to question this. The documentation is currently misleading: The file is parsed internally by export HOMEBREW_NO_ENV_HINTS=1 are treated as invalid. This is why: HOMEBREW_NO_ENV_HINTS=1 works, while the You discovered this by manually removing the Docs are missing this key point The current
...does not mention:
Suggestion: Yes — I agree the man page should be clarified. It could say something like:
Alternatively, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew config
Output of
brew doctor
Description of issue
I was trying to figure out why homebrew wasn't picking up setting
HOMEBREW_NO_ENV_HINTS
from my~/.homebrew/brew.env
file. When I set it in.zprofile
, it worked as expected. Like any good user, I read the man page, which I've included below. My initial attempt wasexport HOMEBREW_NO_ENV_HINTS=1
just like the man page says. No errors, but also not setting the variable. After some searching I found an old discussion that indicated the
brew.env
file is a key-value format, I removed theexport
and it worked. As a test, I removed the=
, and got the following error, so I knew it was attempting to process the file./opt/homebrew/bin/brew: line 139: export: `HOMEBREW_NO_ENV_HINTS 1': not a valid identifier
man brew
says the following for theENVIRONMENT
section. Nowhere can I find anything that says the file should be in a key-value format. The only placekey
occurs in the man page is for the option--keyboard-layoutdir
in theGLOBAL CASK OPTIONS
section.Before I file an issue, my question is should the man page be updated to indicate the
brew.env
files should NOT haveexport
preceding the variable name? Or should thebrew
command either ignore theexport
keyword or perhaps treat it as an error?Beta Was this translation helpful? Give feedback.
All reactions