4 ms·
Apple updates are a joke. I have a script in my dotfiles to recognize when an apple update overwrites `/etc/zshrc` to run, among other things, a utility that re
by flaminHotSpeedo 3y ago
Apple updates are a joke. I have a script in my dotfiles to recognize when an apple update overwrites `/etc/zshrc` to run, among other things, a utility that rewrites your path in a nonstandard way (I don't remember the details, I think it was something related to config file load order?)
Nothing I've done so far to stop the overwrite in the first place has worked.
- turquoisevar 3y agoIs there a particular reason you’re not putting .zshrc in the user’s home folder ~/.zshrc? In any case, / root and /etc (to an extend) are part of the system volume (or rather the system volume snapshot if we want to be pedantic). With some exceptions Apple considers that fair game. There’s a bunch of symlinking and firmlinking done to make it look like one coherent whole but only the stuff on the data volume is safe. That said, if for whatever reason you need to put something in root you can create your own synthetic firmlink[0] with /etc/synthetic.conf. I believe some also reported success by simply making a subdirectory under /etc and use that instead but YMMV. hoakly goes into extensive detail with what changed with volumes on macOS (back in 2019 I believe): https://eclecticlight.co/2021/01/13/big-sur-boot-volume-layout/ https://eclecticlight.co/2021/01/13/big-sur-boot-volume-layo... 0: https://derflounder.wordpress.com/2020/01/18/creating-root-level-directories-and-symbolic-links-on-macos-catalina/ https://derflounder.wordpress.com/2020/01/18/creating-root-l...
- rgovostes 3y agoSome notes on how Apple sets up paths in /etc/zprofile: https://apple.stackexchange.com/questions/432226/homebrew-path-set-in-zshenv-is-overridden/432227#432227 https://apple.stackexchange.com/questions/432226/homebrew-pa... > The solution is to do path initialization in ~/.zprofile on macOS. This file is loaded after /etc/zprofile and before ~/.zshrc.
- flaminHotSpeedo 3y agoThanks! I prefer to set my path in ~/.zshenv so I don't have to worry about anything misbehaving in non-login shells, but this rabbithole led me to a good option to cover both: https://www.zsh.org/mla/users/2003/msg00600.html https://www.zsh.org/mla/users/2003/msg00600.html