summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-11-24 19:44:49 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2021-11-24 19:46:39 +0100
commita4cbd31c5c527e7235eae6f87a0bdbe0640b6013 (patch)
treeb66c060cca131e7e25857ba6ca764f52f73edc62 /gnu
parentc47a45ca7e914a7a17c29179fdcab9be77b785f5 (diff)
downloadguix-a4cbd31c5c527e7235eae6f87a0bdbe0640b6013.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/home/services/shells.scm4
1 files changed, 3 insertions, 1 deletions
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\" ]