docs for RAISE_SUBPROC_ERROR

This commit is contained in:
Anthony Scopatz 2016-01-24 12:08:50 -05:00
parent 224bba9bba
commit 62939d446a
2 changed files with 11 additions and 1 deletions

View file

@ -5,7 +5,12 @@ Xonsh Change Log
Current Developments
====================
**Added:** None
**Added:**
* Added boolean ``$RAISE_SUBPROC_ERROR`` environment variable. If true
and a subprocess command exits with a non-zero return code, a
CalledProcessError will be raised. This is useful in scripts that should
fail at the first error.
**Changed:** None

View file

@ -1018,6 +1018,11 @@ operates on a given argument, rather than on the string ``'xonsh'`` (notice how
bash $ echo @(' '.join($(cat @('file%d.txt' % i)).strip() for i in range(6)))
s n a i l s
Additionally, if the script should exit if a command fails, set the
environment variable ``$RAISE_SUBPROC_ERROR = True`` at the top of the
file. Errors in Python mode will already raise exceptions and so this
is roughly equivelent to Bash's `set -e`.
Importing Xonsh (``*.xsh``)
==============================
You can import xonsh source files with the ``*.xsh`` file extension using