Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.bash_profile and .profile #44

Open
5uy4n9 opened this issue Oct 25, 2022 · 0 comments
Open

.bash_profile and .profile #44

5uy4n9 opened this issue Oct 25, 2022 · 0 comments

Comments

@5uy4n9
Copy link

5uy4n9 commented Oct 25, 2022

As bash docs says:

When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.

and .profile is not only working for bash, but also for other shells

but seems like goup just simply insert source "$HOME/.go/env" to both .bash_profile and .profile, so if the .bash_profile not existed and .profile existed before goup installed,
when goup installed, an interactive bash login shell will load .bash_profile and stop, the previous command existed in .profile will not execute
so maybe insert source "$HOME/.profile" instead of source "$HOME/.go/env" for .bash_profile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant