pyenv / pyenv-installer

This tool is used to install `pyenv` and friends.
MIT License
3.99k stars 431 forks source link

Is it really necessary to rely on a login shell? #63

Closed pavel-kirienko closed 6 years ago

pavel-kirienko commented 6 years ago

The installer script suggests using the file ~/.bash_profile for bash environment settings, which is only read by login shells:

https://github.com/pyenv/pyenv-installer/blob/92c4cd2812d12c8170f4970f8d4d71e18d093bd7/bin/pyenv-installer#L53-L56

Is it not possible to use either ~/.profile or ~/.bashrc instead? They are sourced by interactive shells of all types, which seems to make things easier for the user.

YAmikep commented 6 years ago

I was also wondering whether to use .profile vs .bash_profile. Any insights anybody?

(I am using Ubuntu Bionic)

pavel-kirienko commented 6 years ago

Works for me flawlessly with ~/.bashrc on Ubuntu 16.04

00willo commented 6 years ago

~/.bashrc is also sourced in the default ~/.bash_profile on CentOS and also RedHat. Also on the CI front, ~/.bashrc is all that's sourced automatically on steps within CircleCI, I'm guessing it similar on Jekins and Travis, but I currently have no confirmation of that.

richard-scott commented 6 years ago

You can use any file that works...

All end up with the end result being the same.

obestwalter commented 6 years ago

It looks like we can merge #74 to suggest that .bashrc is the right place in most cases then ...