mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Fix: don't display welcome if $XONSHRC_DIR member is found (#4531)
* Fix: don't display welcome if $XONSHRC_DIR member is found * Docs: add news item * Update news/fix-xonshrc-dir-welcome.rst Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com> * Lint: black * Update news/fix-xonshrc-dir-welcome.rst Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com> Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
This commit is contained in:
parent
337cf25a40
commit
99bdf5600a
2 changed files with 27 additions and 2 deletions
23
news/fix-xonshrc-dir-welcome.rst
Normal file
23
news/fix-xonshrc-dir-welcome.rst
Normal file
|
@ -0,0 +1,23 @@
|
|||
**Added:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Changed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Deprecated:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Removed:**
|
||||
|
||||
* <news item>
|
||||
|
||||
**Fixed:**
|
||||
|
||||
* Do not show welcome message when any ``$XONSHRC_DIR`` directory entry exists.
|
||||
|
||||
**Security:**
|
||||
|
||||
* <news item>
|
|
@ -464,8 +464,10 @@ def main_xonsh(args):
|
|||
env["XONSH_INTERACTIVE"] = True
|
||||
|
||||
ignore_sigtstp()
|
||||
if env["XONSH_INTERACTIVE"] and not any(
|
||||
os.path.isfile(i) for i in env["XONSHRC"]
|
||||
if (
|
||||
env["XONSH_INTERACTIVE"]
|
||||
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"])
|
||||
):
|
||||
print_welcome_screen()
|
||||
events.on_pre_cmdloop.fire()
|
||||
|
|
Loading…
Add table
Reference in a new issue