pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
pyinfra does not exit with failure (non-zero exit code) when operations wrapped in python.call are failed. When something goes wrong and there are Errors, the command line should report a non-zero exit code.
To Reproduce
Steps to reproduce the behavior, please include where possible:
from pyinfra.operations import python, server
def foo():
# fails
server.shell("/bin/false")
python.call(foo)
Describe the bug
pyinfra does not exit with failure (non-zero exit code) when operations wrapped in python.call are failed. When something goes wrong and there are Errors, the command line should report a non-zero exit code.
To Reproduce
Steps to reproduce the behavior, please include where possible:
Run:
pyinfra @local deploy.py
The process exit code is 0!
Expected behavior
non-zero exit code.
Meta
pyinfra --support
-vv
and--debug
.