Skip welcome if there is no TTY (#5414)

## For community
⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍
comment**

---------

Co-authored-by: a <1@1.1>
This commit is contained in:
Andy Kipp 2024-05-15 03:18:19 +02:00 committed by GitHub
parent eff74d9d9a
commit e7f2489486
Failed to generate hash of commit
2 changed files with 2 additions and 0 deletions

View file

@ -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(

View file

@ -528,6 +528,7 @@ def main_xonsh(args):
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"])
):