From c1c6ae2ae57822cff49228261e8571cd1b1b6fb7 Mon Sep 17 00:00:00 2001 From: Olblak Date: Fri, 5 Sep 2025 14:47:35 +0200 Subject: [PATCH] feat: doc condition failwhen --- content/en/docs/core/condition.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/en/docs/core/condition.adoc b/content/en/docs/core/condition.adoc index 0173b6f5b..94a546612 100644 --- a/content/en/docs/core/condition.adoc +++ b/content/en/docs/core/condition.adoc @@ -28,6 +28,15 @@ Please look at each kind of resource (shell, file, etc.) for details about "how {{< coreparameters "conditions" >}} +=== Using `failwhen` + +The `failwhen` parameter allows you to **invert the result of a condition**: + +* `failwhen: false` → Normal behavior: success is success, failure is failure. (Default behavior) +* `failwhen: true` → Inverted behavior: success is treated as failure, failure is treated as success. + +This is particularly useful for testing or enforcing negative checks. + == Examples * Example with only 1 source: