]> git.ekhem.eu.org Git - guix.git/commitdiff
[bash] Avoid sourcing .bash_profile in .bashrc.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 30 May 2022 07:24:20 +0000 (09:24 +0200)
committerJakub Czajka <jczajka@google.com>
Sun, 24 Dec 2023 18:53:07 +0000 (19:53 +0100)
.bashrc is sourced by interactive non-login shells. However, these
shells are run in an environment that was started through a login
shell. Therefore, an interactive non-login shell should have inherited
environment variables created by a login shell in .bash_profile.

bash/.bashrc

index 2a98ec772ecf98bdef123351757e54b74832b906..2b73f4dab56d5089afa425c93bffbf2144f986f9 100644 (file)
@@ -4,12 +4,7 @@
 #
 # .bashrc - bash dotfile for interactive shells.
 #
-# Sources $HOME/.bash_profile. See bash(1) for more information about interactive
-# shells.
-
-if [ -f "${HOME}/.bash_profile" ]; then
-    . ${HOME}/.bash_profile
-fi
+# See bash(1) for more information about interactive shells.
 
 # Prompt
 export PS1="[\w]$ "