summaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2018-10-14 08:38:26 -0500
committerMario Rodas <marsam@users.noreply.github.com>2018-10-14 10:38:40 -0500
commitb82bc64a0e48637fff514d222f3107575aa71c7a (patch)
tree85710c826cc6ec7716c95f8b8ebe9bf8a10318aa /modules/programs
parent5fa894c90ac224f86592a3d7da76932593542a16 (diff)
bash: do not evaluate /etc/bashrc on non-interactive shells
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/bash/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/programs/bash/default.nix b/modules/programs/bash/default.nix
index 0e116ae..542b1e2 100644
--- a/modules/programs/bash/default.nix
+++ b/modules/programs/bash/default.nix
@@ -52,6 +52,9 @@ in
# /etc/bashrc: DO NOT EDIT -- this file has been generated automatically.
# This file is read for interactive shells.
+ # If not running interactively, don't do anything
+ [[ $- != *i* ]] && return
+
# Make bash check its window size after a process completes
shopt -s checkwinsize