From 7d662cdd4425b405ca65c27112178a900f900c93 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Mon, 30 May 2022 09:24:20 +0200 Subject: [PATCH] [bash] Avoid sourcing .bash_profile in .bashrc. .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 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 2a98ec7..2b73f4d 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -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]$ " -- 2.39.5