Skip to content

Commit db8b7a5

Browse files
authored
feat: doc condition failwhen (updatecli#2368)
1 parent f93111b commit db8b7a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

content/en/docs/core/condition.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ Please look at each kind of resource (shell, file, etc.) for details about "how
2828

2929
{{< coreparameters "conditions" >}}
3030

31+
=== Using `failwhen`
32+
33+
The `failwhen` parameter allows you to **invert the result of a condition**:
34+
35+
* `failwhen: false` → Normal behavior: success is success, failure is failure. (Default behavior)
36+
* `failwhen: true` → Inverted behavior: success is treated as failure, failure is treated as success.
37+
38+
This is particularly useful for testing or enforcing negative checks.
39+
3140
== Examples
3241

3342
* Example with only 1 source:

0 commit comments

Comments
 (0)