postmodern / ruby-install

Installs Ruby, JRuby, TruffleRuby, or mruby
MIT License
1.9k stars 252 forks source link

Do not use sudo for brew if not necessary #396

Closed rb83 closed 3 years ago

rb83 commented 3 years ago

Normally, brew installations do not require sudo. There might be certain cases where it does, so this commit preserves the old behaviour where ownership of the brew script isn't the same as the user executing ruby-install. Otherwise, sudo is omitted.

This also solves #128 for situations where the issue was caused by sudo not preserving the user's environment (proxy failures could also be caused by a host of other reasons, but it's the main reason why the issue was created originally).

rb83 commented 3 years ago

CI failures seem to have been caused in unrelated files?

rb83 commented 3 years ago

rebased on upstream master in order to have the checks re-run.

rb83 commented 3 years ago

Also solves #376.

postmodern commented 3 years ago

0.8.2 has been tagged. Now to wait for homebrew to pull in the new formula.