mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
docs for RAISE_SUBPROC_ERROR
This commit is contained in:
parent
224bba9bba
commit
62939d446a
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue