diff --git a/sections/new-hooks.md b/sections/new-hooks.md index 587ccfd5..99c56380 100644 --- a/sections/new-hooks.md +++ b/sections/new-hooks.md @@ -93,6 +93,9 @@ For example: types: [text] ``` +To determine if an application was spawned as a `pre-commit` hook you can check +for the existence of the `PRE_COMMIT` environment variable. + ## Developing hooks interactively Since the [`repo`](#repos-repo) property of `.pre-commit-config.yaml` can refer to anything