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

Feature Request: check versions before install #420

Open
tir38 opened this issue Apr 27, 2022 · 3 comments
Open

Feature Request: check versions before install #420

tir38 opened this issue Apr 27, 2022 · 3 comments
Labels

Comments

@tir38
Copy link

tir38 commented Apr 27, 2022

I can run the installer twice in a row and it'll duplicate much of the work. It would be helpful if ruby-install could check if a version is installed already before running through the whole install process.

@postmodern
Copy link
Owner

We already have a --no-reinstall flag which checks for the existence of $install_dir/bin/ruby, prints a warning and exits. We could make this behavior the default behavior, and require --reinstall or --overwrite option flags to force ruby-install to re-install over an existing ruby install.

@tir38
Copy link
Author

tir38 commented Apr 29, 2022

I think adding something to the README would be good enough, although I see there is already an open issue to do that: #266

@tir38 tir38 closed this as completed Apr 29, 2022
@tir38 tir38 reopened this Apr 29, 2022
@todd-a-jacobs
Copy link

I have a Fish function that's easily converted to Bourne-like shells (mostly the array logic and regexp pattern matching currently leverage Fish rather than external utilities like grep or known Bashisms) that could check the current list of Rubies reported by chruby against the latest as reported by ruby-install. I'm deliberately going through the existing utilities rather than looking at the filesystem directly as a convenience and a useful (to me) abstraction that keeps chruby and ruby-install as the authoritative source of versions under their management. Happy to share the relevant snippets so people can kick the tires, or to try to add the code directly as a PR if it's a desirable feature.

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

No branches or pull requests

3 participants