-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Zsh etcdir shouldn't be disabled by default #25719
Comments
I'd suggest fixing this in your local configuration. We did this to avoid users needing to change system files that are harder to restore than Homebrew ones. |
There's no real need to change system files — renaming I think the actual problem here is that everyone updating zsh to 5.0.5 right now is going to end up with a different environment than the one they had before (e.g. MacTeX suddenly disappears from $PATH, which is exactly why I found out about this change in the first place). |
@allait The MacTeX and BasicTeX casks in homebrew-cask were updated with caveats for this use case. (See Homebrew/homebrew-cask#2311, Homebrew/homebrew-cask#2284, and Homebrew/homebrew-cask#2277.) |
@goxberry I think it's worth noting that MacTeX installer does add itself to system PATH: it creates |
@allait I already noted that MacTeX uses |
I agree. OS X adds system wide paths to /etc/paths.d which can then be retrieved using /usr/libexec/path_helper. Do to the patch for #24538, system wide paths are no longer added to zsh sessions by default. Therefore please either revert this fix or add a caveat that users need to add |
@FloFra If you can submit a PR that makes |
Both Homebrew bash and fish read from their respective |
The problem in this case was that you needed to modify system files. |
No, you only have to modify the file system, if you do not want |
Read the caveats of the commit that changed this behaviour and you'll see what I mean. |
OK, yeah, I see why now. Assuming zsh does look in |
Sounds reasonable to me @mistydemeo. I don't object to us using the stuff in |
@nuoymit Thanks for the reasonable reply. If the two are unrelated I don't have a problem with us reading from |
@MikeMcQuaid you're right, as a project owner you should have an issue with the caveat. After giving it some more thought, I think in this particular issue, we're asking homebrew to do too much. It makes sense to keep the caveat removed but also restore the default of reading from Understanding shell initialization is not the goal of the homebrew project. That should be the goal of the user. It is unfortunate default OS X setup makes this much more difficult than it needs to be, but it is also unfortunate that the common knowledge out there about shell initialization tends to be subpar at best because it is made for convenience, not correctness.
|
@MikeMcQuaid So wait, why did you remove the caveats in the end? I think @nuoymit was arguing that you leave them in. The OS X bug where |
@mislav Sure. We don't want to advise people to modify system files though (hence why we originally pulled this change to the etcdir). It's a bug, sure, but it's Apple's bug rather than Homebrew's. |
Per discussion in Homebrew#3597 and Homebrew/legacy-homebrew#25719
This reverts commit 52fe004. Conflicts: Library/Formula/zsh.rb References Homebrew#24538. References Homebrew#25719.
A recent change #24538 disabled the reading of Zsh rc files in
/etc
by default, which means that paths added to/etc/paths.d
by application installers (like MacTeX and XQuartz) don't get added to$PATH
at all (unlike bash, which still reads/etc/profile
).Caveat added in #11056 about renaming
/etc/zshenv
to/etc/zprofile
means thatpath_helper
will be executed only for login shells, it doesn't disable it completely. As far as I can tell nothing has changed in Mavericks and if the user doesn't wantpath_helper
to run for non-login shells renaming the file still is the way to go.The text was updated successfully, but these errors were encountered: