Documentation for ~/.homebrew/brew.env incorrect? #6221
Replies: 1 comment 3 replies
|
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=1are treated as invalid. This is why: HOMEBREW_NO_ENV_HINTS=1works, 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, |
Uh oh!
There was an error while loading. Please reload this page.
Output of
brew configOutput of
brew doctorDescription of issue
I was trying to figure out why homebrew wasn't picking up setting
HOMEBREW_NO_ENV_HINTSfrom my~/.homebrew/brew.envfile. 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=1just 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.envfile is a key-value format, I removed theexportand 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 identifierman brewsays the following for theENVIRONMENTsection. Nowhere can I find anything that says the file should be in a key-value format. The only placekeyoccurs in the man page is for the option--keyboard-layoutdirin theGLOBAL CASK OPTIONSsection.Before I file an issue, my question is should the man page be updated to indicate the
brew.envfiles should NOT haveexportpreceding the variable name? Or should thebrewcommand either ignore theexportkeyword or perhaps treat it as an error?All reactions