cfpb / mac-setup Goto Github PK
View Code? Open in Web Editor NEWScripts and baseline dotfiles for setting up a new CFPB developer Mac
License: Creative Commons Zero v1.0 Universal
Scripts and baseline dotfiles for setting up a new CFPB developer Mac
License: Creative Commons Zero v1.0 Universal
The Homebrew and Python setup scripts try to put their own bin directories ahead of the system ones, so that for example python
invokes Pyenv. But this doesn't work right, and these directories end up after the system ones.
The homebrew_setup.sh adds this line to .zshenv:
export PATH=/Users/me/homebrew/bin:${PATH}
and then python_setup.sh adds this line to .zshenv:
eval export PATH="/Users/me/.pyenv/shims:${PATH}"
The idea being that after .zshenv runs, PATH
should be something like:
/Users/me/.nvm/versions/node/v16.13.0/bin:/Users/me/.pyenv/shims:/bin:/Users/me/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
In practice, though, when Zsh starts up it first sources our .zshenv but then sources /etc/profile, which on Big Sur contains this line:
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
which has the effect of moving the system paths back to the front:
% export PATH=/Users/me/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
% echo $PATH
/something:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
% eval `/usr/libexec/path_helper -s`
% echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/me/.pyenv/shims
This means that e.g. running python
chooses the wrong thing:
% which python
/usr/bin/python
I think perhaps we should move our path manipulation to .zshrc, instead of .zshenv, to avoid this rewriting. @willbarton or others who are more familiar with Zsh: would this have any negative side effects?
Right now if we chose to reset Homebrew, the homebrew_setup.sh
script will use Homebrew's own uninstall script.
Then if it proceeds to try to install it again, it will try to mkdir homebrew && ...
, and the mkdir
will fail because the Homebrew uninstall doesn't appear to remove that directory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.