don't call ruby install for language_version = default

This commit is contained in:
Anthony Sottile 2020-10-29 19:45:06 -07:00
parent b2207e5b04
commit e05ac1e91f
2 changed files with 33 additions and 11 deletions

View file

@ -121,8 +121,8 @@ def install_environment(
# Need to call this before installing so rbenv's directories
# are set up
helpers.run_setup_cmd(prefix, ('rbenv', 'init', '-'))
# XXX: this will *always* fail if `version == C.DEFAULT`
_install_ruby(prefix, version)
if version != C.DEFAULT:
_install_ruby(prefix, version)
# Need to call this after installing to set up the shims
helpers.run_setup_cmd(prefix, ('rbenv', 'rehash'))