guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: home: services: bash: Only source /etc/bashrc if


From: guix-commits
Subject: branch master updated: home: services: bash: Only source /etc/bashrc if it exists.
Date: Wed, 24 Nov 2021 13:46:17 -0500

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new a4cbd31  home: services: bash: Only source /etc/bashrc if it exists.
a4cbd31 is described below

commit a4cbd31c5c527e7235eae6f87a0bdbe0640b6013
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Wed Nov 24 19:44:49 2021 +0100

    home: services: bash: Only source /etc/bashrc if it exists.
    
    * 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(-)

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 80f13a3..ca7f4ac 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\" ]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]