Skip to content

Assert Lefthook is running with an environment variable #1093

@paduszyk

Description

@paduszyk

⚡ Summary

Setting LEFTHOOK environment variable to true (or 1) when Lefthook is running.

Alternatively, LEFTHOOK_VERSION variable can be added or runtime to indicate that one runs Lefthook with an extra information the release number.

Value

Currently, one can disable Lefthook via LEFTHOOK=0. But I guess there is no way to detect Lefthook running. For example, some development/debugging tools may be interested whether they are loaded/used within pre-commit check. Resolving this issue would help.

Behavior and configuration changes

I guess this would not be a breaking change. I am not familiar with the codebase structure, but if you find the idea interesting I can try to implement and add tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA new lefthook feature description

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions