postmodern / ruby-install

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

doesn't make some simple yet very important checks before starting the installation process (e.g need permission when using --sytem flag) #464

Open Mizou04 opened 11 months ago

Mizou04 commented 11 months ago

Description

Steps To Reproduce

Steps to reproduce the bug:

  1. $ ruby-install ...
  2. ???

Expected Behavior

Actual Behavior

Environment

$ ruby-install --version
...
$ uname -a
...
$ cc --version
...
$ openssl version
...
Mizou04 commented 11 months ago

I have a fix for this issue

postmodern commented 11 months ago

@Mizou04 feel free to submit a PR. I'm guessing an extra if [[ ! -w "$install_dir" ]]; then could be added to bin/ruby-install.

Mizou04 commented 11 months ago

actually I modified directly the function responsible for parsing the options so it doesn't need to go the whole stack down to bin/ruby-install, is that ok?