Skip to content

Commit

Permalink
Merge pull request #751 from elliotfontaine/interactive-guard-clause
Browse files Browse the repository at this point in the history
Add warning about interactive guard clause in some default .bashrc files
  • Loading branch information
oliver-sanders authored Jan 8, 2025
2 parents e2106eb + 0986936 commit 6248cad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ requests_).
- David Sutherland
- Thomas Coleman
- Scott Wales
- Elliot Fontaine
<!-- end-shortlog -->

(All contributors are identifiable with email addresses in the git version
Expand Down
10 changes: 10 additions & 0 deletions src/user-guide/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ run for interactive sessions like so:
export PATH="$HOME/bin:$PATH"
export MY_LIB_PATH="$HOME/my-lib/1.0/"
Conversely, make sure to **remove** the interactive guard clause that is present in the default ``.bashrc`` of some Linux distributions (e.g. `Debian <https://sources.debian.org/src/bash/4.3-11/debian/skel.bashrc/>`_).

.. code-block:: bash
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
Some things to check your login files for:

* Don't write to stdout (e.g. using ``echo`` or ``printf``), this can interfere
Expand Down

0 comments on commit 6248cad

Please sign in to comment.