postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.89k stars 250 forks source link

Avoid running `brew` as root #471

Closed postmodern closed 8 months ago

postmodern commented 10 months ago

Homebrew does not support being ran as root. It appears that the logic in install_packages can still end up running homebrew as root.

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.

We need a more reliable way to detect the homebrew user or the original user ($SUDO_USER), and run homebrew as that user.

phantomwhale commented 8 months ago

Just bumped into this on a new machine install - the commits on HEAD fixed the issue for me, so thanks!

postmodern commented 8 months ago

@phantomwhale more reason for me to release 0.9.3 soon, instead of waiting to release 0.10.0 later.

postmodern commented 8 months ago

Marking this as closed by 802f245. Will be released in 0.9.3 shortly.