You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mdbook/configuration/fail_on_changes.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ The behaviour of lefthook when files (tracked by git) are modified can set by mo
7
7
-`ci`: exit with a non-zero status only when the `CI` environment variable is set. This can be useful when combined with `stage_fixed` to ensure a frictionless devX locally, and a robust CI.
8
8
-`non-ci`: exit with a non-zero status only when the `CI` environment variable is _not_ set. This can be useful in setups where the CI pipeline commits changes automatically, such as [autofix.ci](https://autofix.ci).
9
9
10
+
See also [`fail_on_changes_diff`](./fail_on_changes_diff.md).
When Lefthook exits with a non-zero status as a result of [`fail_on_changes`](./fail_on_changes.md) triggering, it can optionally output a diff of the detected changes.
4
+
5
+
The default behavior is to output the diff when run in a CI pipeline.
6
+
The `fail_on_changes_diff` boolean configuration parameter can be used to override this.
0 commit comments