Skip to content

.bash_profile and .profile #44

@5uy4n9

Description

@5uy4n9

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions