tfenv icon indicating copy to clipboard operation
tfenv copied to clipboard

unable to install this tfenv for all linux users.

Open Balakrishna625 opened this issue 4 years ago • 3 comments

I am installing the tfenv using the following commands

git clone https://github.com/tfutils/tfenv.git ~/.tfenv echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile ln -s ~/.tfenv/bin/* /usr/local/bin

$ mkdir -p ~/.local/bin/ $ . ~/.profile $ ln -s ~/.tfenv/bin/* ~/.local/bin $ which tfenv/

after this its installed on only one user account and other user accounts are unable to use this tfenv, please guide us on this

Balakrishna625 avatar Feb 03 '21 05:02 Balakrishna625

Hi @Balakrishna625

I think the problem is you're repeating step 2.

After you've git cloned. (step 1) You should either do: 2a. echo export... or 2b. ln -s ~/.tf.. or 2c. mkdir -p

I used 2a. and it seems to work for me okay

mainangethe avatar Feb 05 '21 17:02 mainangethe

If you install in the home directory for one user, you would expect only that user to use the installation. If you install in e.g. /opt/tfenv, then you can make the installation available for any user who declares PATH=/opt/tfenv/bin:${PATH}.

However, if you install for all users, you must make the installation writable by all users, and should make it clear that users are subject to potential conflicts if they change the default version with tfenv use or if they re-install versions that might already be in use.

Zordrak avatar Feb 06 '21 17:02 Zordrak

However, if you install for all users, you must make the installation writable by all users, and should make it clear that users are subject to potential conflicts if they change the default version with tfenv use or if they re-install versions that might already be in use.

It would be great if the path to store current selected Terraform version was configurable. This way, a single global install would be able to serve multiple users, or even multiple projects for a single user.

See #251

next-jesusmanuelnavarro avatar Mar 23 '21 16:03 next-jesusmanuelnavarro