pants icon indicating copy to clipboard operation
pants copied to clipboard

Allow for further differentiation of exit codes by plugins

Open stuhood opened this issue 4 years ago • 2 comments

When Pants exits with a non-zero exit code, there can be many different reasons: not all of which represent errors.

Two cases that come to mind:

  • Hitting Ctrl+C
  • Using ./pants run $script on a script that we expect might fail

Currently, StreamingWorkunitHandler plugins cannot detect these cases, but they're important for differentiating failure. We should likely extend the RunTracker exit code, and likely also the Goal API to allow for differentiating these cases.

stuhood avatar Aug 12 '21 16:08 stuhood

there is already an outcome field in run tracker, I think adding values there makes sense.

asherf avatar Aug 12 '21 17:08 asherf

This issue has been open for over one year without activity and is not labeled as a bug. It has been labeled as stale to invite any further updates. If you can confirm whether the issue is still applicable to the latest version of Pants, appears in other contexts, or its priority has changed, please let us know. Please feel free to close this issue if it is no longer relevant.

github-actions[bot] avatar Dec 02 '25 04:12 github-actions[bot]