Skip to content

Commit

Permalink
Skip welcome if there is no TTY (#5414)
Browse files Browse the repository at this point in the history
## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

---------

Co-authored-by: a <1@1.1>
  • Loading branch information
anki-code and a committed May 15, 2024
1 parent eff74d9 commit e7f2489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/test_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,7 @@ def test_catching_system_exit():


@skip_if_on_windows
@pytest.mark.flaky(reruns=3, reruns_delay=1)
def test_catching_exit_signal():
stdin_cmd = "kill -SIGHUP @(__import__('os').getpid())\n"
out, err, ret = run_xonsh(
Expand Down
1 change: 1 addition & 0 deletions xonsh/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def func_sig_ttin_ttou(n, f):
ignore_sigtstp()
if (
env["XONSH_INTERACTIVE"]
and sys.stdin.isatty() # In case the interactive mode is forced but no tty (input from pipe).
and not any(os.path.isfile(i) for i in env["XONSHRC"])
and not any(os.path.isdir(i) for i in env["XONSHRC_DIR"])
):
Expand Down

0 comments on commit e7f2489

Please sign in to comment.