Using sudo to install brew apps?
davegomez opened this issue · comments
Hi, I was just reading the bash scripts and I noticed you use brew to install several apps while you keep alive the sudo session.
Is this ok?
Since I remember brew recommends do not use sudo to install apps, how you handle this?
@davegomez the brew apps themselves are not installed using sudo
. in brew.sh
there are only two lines that use sudo
;
# Install GNU core utilities (those that come with OS X are outdated).
...
sudo ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
# We installed the new shell, now we have to activate it
echo "Adding the newly installed shell to the list of allowed shells"
# Prompts for password
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
The keep alive is used so that you can chain the various dotfiles together for automation with .dots without having to frequently re-enter credentials.
Awesome, thanks for the answer.