Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omitting ruby version makes ruby-install exit successfully #319

Open
p-mongo opened this issue Jul 24, 2018 · 1 comment
Open

Omitting ruby version makes ruby-install exit successfully #319

p-mongo opened this issue Jul 24, 2018 · 1 comment

Comments

@p-mongo
Copy link

p-mongo commented Jul 24, 2018

I ran the following command:

ruby-install -c -j2 --no-install-deps -r /data/rubies --patch 1.9.3-p551.diff -- --disable-install-doc

What I meant to run was the following:

ruby-install -c -j2 --no-install-deps -r /data/rubies --patch 1.9.3-p551.diff 1.9.3-p551 -- --disable-install-doc

ruby-install silently ignored all of the command line arguments and told me what the current versions of various ruby implementations were. As this was in a script I was momentarily confused why later in the run I had no ruby 1.9 despite giving set -e everywhere.

Perhaps ruby-install should fail with an error if it is given options but no ruby version to install.

@postmodern
Copy link
Owner

postmodern commented Oct 10, 2020

Two separate bugs here.

  1. ruby-install -c -j2 --no-install-deps -r /data/rubies --patch 1.9.3-p551.diff -- --disable-install-doc: since you didn't specify a ruby/version, parse_options assumes you want to list available ruby versions, since ruby-install is a valid invocation. So maybe only list rubies if there are absolutely zero arguments given?
  2. ruby-install -c -j2 --no-install-deps -r /data/rubies --patch 1.9.3-p551.diff 1.9.3-p551 -- --disable-install-doc: causes parse_ruby to incorrectly try to parse 1.9.3-p551 as ruby-version format. parse_ruby could obviously be a little smarter...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants