rbenv / rbenv-installer

Installer and doctor scripts for rbenv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

devstuff opened this issue · comments

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.

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 🤔