From 83d4349ea13c514abfe52b0ae31276d54b5bdf4a Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Wed, 22 Oct 2025 20:59:26 -0400 Subject: [PATCH] Add non-interactive check back --- default/bashrc | 3 +++ migrations/1761180745.sh | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 migrations/1761180745.sh diff --git a/default/bashrc b/default/bashrc index f9ea4fd4..eaf13c66 100644 --- a/default/bashrc +++ b/default/bashrc @@ -1,3 +1,6 @@ +# If not running interactively, don't do anything (leave this at the top of this file) +[[ $- != *i* ]] && return + # All the default Omarchy aliases and functions # (don't mess with these directly, just overwrite them here!) source ~/.local/share/omarchy/default/bash/rc diff --git a/migrations/1761180745.sh b/migrations/1761180745.sh new file mode 100644 index 00000000..5a6b1e0f --- /dev/null +++ b/migrations/1761180745.sh @@ -0,0 +1,7 @@ +echo "Ensure interactive shell check is at the top of .bashrc" + +BASHRC="$HOME/.bashrc" + +if [ -f "$BASHRC" ] && ! grep -q '\[\[ $- != \*i\* \]\] && return' "$BASHRC"; then + sed -i '1i# If not running interactively, don'\''t do anything (leave this at the top of this file)\n[[ $- != *i* ]] && return\n' "$BASHRC" +fi