mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-26 00:59:11 -05:00
pre-commit env var exposed
This commit is contained in:
@@ -347,6 +347,9 @@ def run(
|
||||
if args.checkout_type:
|
||||
environ['PRE_COMMIT_CHECKOUT_TYPE'] = args.checkout_type
|
||||
|
||||
# Set pre_commit flag
|
||||
environ['PRE_COMMIT'] = '1'
|
||||
|
||||
with contextlib.ExitStack() as exit_stack:
|
||||
if stash:
|
||||
exit_stack.enter_context(staged_files_only(store.directory))
|
||||
|
||||
Reference in New Issue
Block a user