rbenv / rbenv-installer

Installer and doctor scripts for rbenv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation via apt-get ends up with multiple rbenv executables in PATH

j-adamczyk opened this issue · comments

On Ubuntu 20.04 files in /usr/bin/rbenv and /bin/rbenv are synchronized. Because of this the installation for Linux from readme fails.
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash prints:

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/bin/rbenv
  /bin/rbenv

This is expected, since there are 2 identical files, rbenv, in both those directories. Because of the synchronization I can't just delete one of those files. Since this is a symlink anyway (/usr/bin/rbenv -> ../lib/rbenv/libexec/rbenv*), this should be allowed and just one file should be used.

I've submitted a pull request that fixes it.

It uses the inode number to detect if the "duplicate" binaries from which -a are actually the same file.