At first this was a bit funny, like playing "Bash Roulette" ...but now it's getting old lol
Any command in my terminal that exits with non-zero code closes my terminal window
I was told that perhaps I have set -e
set in some bash script somewhere that my terminal sources.
I have checked .bash_profile
/ .bashrc
/ .profile
and it doesn't look like set -e
is in there.
Would there be any other obvious culprits?
set +e
, does it repair the problem? If so, which I assume, then you need to keep looking for thatset -e
. It could be in the global versions of these files under/etc
, or in any other script sourced from them. Move your config files away, if the problem is fixed then add back the lines in smaller chunks to see where it breaks. – egmont Nov 27 '17 at 23:21PS4=' ${BASH_SOURCE}:$LINENO: ' bash -lixc true |& grep -e set -e trap
could be informative. – muru Nov 28 '17 at 03:23-
like so:echo $-
. – David Foerster Nov 28 '17 at 12:57set +e
does not fix the problem? – jewbix.cube Oct 13 '23 at 02:30