From a4cbd31c5c527e7235eae6f87a0bdbe0640b6013 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 24 Nov 2021 19:44:49 +0100 Subject: home: services: bash: Only source /etc/bashrc if it exists. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/home/services/shells.scm (home-bash-configuration): Check whether /etc/bashrc exists before trying to ‘source’ it. Reported by guixy on #guix. --- gnu/home/services/shells.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 80f13a31b7..ca7f4ac0ad 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -390,7 +390,9 @@ then fi # Source the system-wide file. -source /etc/bashrc +if [[ -e /etc/bashrc ]]; then + source /etc/bashrc +fi # Adjust the prompt depending on whether we're in 'guix environment'. if [ -n \"$GUIX_ENVIRONMENT\" ] -- cgit v1.2.3