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

rbenv doctor warns about multiple paths, one symlinks to the other #48

Open
devstuff opened this issue Sep 19, 2023 · 1 comment
Open

Comments

@devstuff
Copy link

devstuff commented Sep 19, 2023

Installed rbenv via Homebrew, and saved the rbenv-doctor script locally. Running rbenv doctor results in the following rbenv doctor output:

Checking for `rbenv' in PATH: multiple
  You seem to have multiple rbenv installs in the following locations.
  Please pick just one installation and remove the others.
  
  /usr/local/Cellar/rbenv/1.2.0/libexec/rbenv
  /usr/local/bin/rbenv

In this case /usr/local/bin/rbenv is a symlink to /usr/local/Cellar/rbenv/1.2.0/libexec/rbenv.

The validation logic should check for symlinks, and check against the link's target path.

Update:

Running the script directly as per the README (curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash) results in a single path for rbenv.

@mislav
Copy link
Member

mislav commented Sep 20, 2023

Hi, thanks for reporting, but rbenv-doctor isn't meant to be installed to PATH and then called as rbenv doctor (i.e., as a rbenv plugin). It was meant to be a standalone script. If you run it as a standalone script, then rbenv won't inject /usr/local/Cellar/rbenv/1.2.0/libexec to PATH and there will be no duplicate entries.

I'm not sure if this is worth fixing 🤔

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

No branches or pull requests

2 participants