Skip to content

Expand definition of action success #14

@bollwyvl

Description

@bollwyvl

Elevator Pitch

Allow a task to declare return values other than the defaults to be considered "successful".

Motivation

Some CLI commands return exotic status codes to indicate failures that can be anticipated.

Some python functions return non-truthy/none values when successful.

Design Ideas

  • create a new extension point, e.g. Passers
  • add a simple, regular-expression based one for strings
  • add a py one for user-defined ones
  • if set, intercept the return values, and see if any of them match
# pyproject.toml
[tool.doitoml.tasks.rebot]
meta = { doitoml ={pass=["252"]}}
actions = [["rebot", "some/output.xml]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions