mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
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:
parent
eff74d9d9a
commit
e7f2489486
2 changed files with 2 additions and 0 deletions
|
@ -1246,6 +1246,7 @@ def test_catching_system_exit():
|
||||||
|
|
||||||
|
|
||||||
@skip_if_on_windows
|
@skip_if_on_windows
|
||||||
|
@pytest.mark.flaky(reruns=3, reruns_delay=1)
|
||||||
def test_catching_exit_signal():
|
def test_catching_exit_signal():
|
||||||
stdin_cmd = "kill -SIGHUP @(__import__('os').getpid())\n"
|
stdin_cmd = "kill -SIGHUP @(__import__('os').getpid())\n"
|
||||||
out, err, ret = run_xonsh(
|
out, err, ret = run_xonsh(
|
||||||
|
|
|
@ -528,6 +528,7 @@ def main_xonsh(args):
|
||||||
ignore_sigtstp()
|
ignore_sigtstp()
|
||||||
if (
|
if (
|
||||||
env["XONSH_INTERACTIVE"]
|
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.isfile(i) for i in env["XONSHRC"])
|
||||||
and not any(os.path.isdir(i) for i in env["XONSHRC_DIR"])
|
and not any(os.path.isdir(i) for i in env["XONSHRC_DIR"])
|
||||||
):
|
):
|
||||||
|
|
Loading…
Add table
Reference in a new issue