How do I tell pants that a non-zero exist code is ...
# development
p
How do I tell pants that a non-zero exist code is ok (from an external tool) and prevent things from blowing up? Context: https://github.com/pantsbuild/pants/pull/13063 I am seeing this in an integration test, this is a legit lint failure but I get an exception instead:
Copy code
pants.engine.internals.scheduler.ExecutionError: 1 Exception encountered:
E           
E           Engine traceback:
E             in select
E             in pants.backend.python.lint.pyupgrade.rules.pyupgrade_fmt
E             in pants.engine.process.fallible_to_exec_result_or_raise
E           Traceback (most recent call last):
E             File "/tmp/process-executionnlGzOO/src/python/pants/engine/process.py", line 275, in fallible_to_exec_result_or_raise
E               local_cleanup=global_options.options.process_execution_local_cleanup,
E           pants.engine.process.ProcessExecutionFailure: Process 'Run pyupgrade on 1 file.' failed with exit code 1.
E           stdout:
E           
E           stderr:
E           Rewriting f.py
h
You use
Get(FallibleProcessResult, Process)
instead of
Get(ProcessResult, Process)
💯 1