cbuschka / tfvm

Terraform Version Manager - Always the right terraform version for your project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use ${HOME}/.local/bin instead of ${HOME}/bin if it is available

cbuschka opened this issue · comments

  • This is a bug report
  • This is a feature request

Expected behavior

tfvm installs to ${HOME}/.local/bin on linux systems, which support fhs/xdg-spec, if it is available.

Actual behavior

Currently tfvm prefers to install to ${HOME}/bin for non root users, which is not the preferred solution according to fhs/xdg

Steps to reproduce the behavior

Install tfm as non root user, then it installs to ${HOME}/bin also if ${HOME}/.local/bin is avaialble and in PATH.

Ok, now ${HOME}/.local/bin is the preferred target for non root user iff

  • ${HOME}/.local/bin exists
  • and ${HOME}/bin/tfvm does not exist
    to remain compatible with previous installations.