ruby-install
ruby-install copied to clipboard
Omitting ruby version makes ruby-install exit successfully
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.
Two separate bugs here.
-
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, sinceruby-install
is a valid invocation. So maybe only list rubies if there are absolutely zero arguments given? -
ruby-install -c -j2 --no-install-deps -r /data/rubies --patch 1.9.3-p551.diff 1.9.3-p551 -- --disable-install-doc
: causesparse_ruby
to incorrectly try to parse1.9.3-p551
asruby-version
format. parse_ruby could obviously be a little smarter...