peopledoc/vault-cli

vault-cli installed as vault, causes collision with official hashicorp vault cli

jason-riddle opened this issue · 5 comments

The documentation says to install vault-cli with pip install vault-cli. However, the script is available as vault and because ~/.local/bin comes first in my path, it is overriding the vault CLI binary, making it impossible to use both tools. Steps to reproduce (using pipx):

# pipx install vault-cli

# pipx list
venvs are in ~/.local/pipx/venvs
apps are exposed on your $PATH at ~/.local/bin
   package vault-cli 1.2.0, Python 3.8.2
    - vault

# ls -al ~/.local/bin
total 0
drwxr-xr-x  3 user  staff   96 Apr  8 10:51 .
drwx------  5 user  staff  160 Apr  8 10:51 ..
lrwxr-xr-x  1 user  staff   51 Apr  8 10:51 vault -> /Users/user/.local/pipx/venvs/vault-cli/bin/vault

Why is this the case? Also, can this be reverted?

Hi, thanks for the issue. vault was the original name of the command and only very recently was it changed to vault-cli (#89) (EDIT I just realized the doc describes master, but I haven't released it yet into a proper version ! Will do this asap!), but we kept the old name for compatibility's sake. That's for the why. We plan to remove the old alias someday but doing it right now would likely break all existing users :/

Now to the "can this be reverted", I'm afraid the best I can suggest is to

  • Use the official vault command by full path
  • rm /.local/bin/vault which will leave you with vault-cli for this tool and vault for the official tool.

I'll leave the ticket open until I:

  • Find a better solution
  • Release a new version of vault-cli that supports vault-cli as the command name, which should be in a few minutes

any updates on this issue? I think users can be notified of the breaking change?

Yep, I've started making sure our internal users won't suffer from the change, and I should be able to make a new release once that is done.

Ok, we should be good to proceed. Do you want to do the PR @abebars ?