We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
empty: vars: a: sh: echo 1 cmds: - echo {{.a}} - task: none ignore_error: true vars: a: 1 - echo {{.a}} none: preconditions: - sh: '[ "{{.a}}" = "2" ]' cmds: - exit 1
> task empty task: [empty] echo 1 1 task: [ "1" = "2" ] failed task: Failed to run task "empty": task: precondition not met Failed at 192: task empty
The text was updated successfully, but these errors were encountered:
similar issue on #855
Sorry, something went wrong.
Delete the precondition. Its senseless (IMMHO) to have a task with a precondition, call it, and then have an option to bypass the precondition.
However, what you could is add a task in-between to manage the situation, something like this:
run_foo: vars: a: sh: echo 1 cmds: - echo {{.a}} - task: foo ignore_error: true vars: a: 1 - echo {{.a}} - task: foo_with_precondition ignore_error: true vars: a: 2 foo_with_precondition: preconditions: - sh: '[ "{{.a}}" = "2" ]' cmds: - task: foo foo: cmds: - exit 1
Precondition is really difficult to use, what Task actually needs is branching, I really need if statments to make task go to different sub-task
No branches or pull requests
The text was updated successfully, but these errors were encountered: