pre-commit env var exposed

This commit is contained in:
Chad Larson 2020-05-23 17:20:26 -05:00
parent f32bc648f0
commit 9e0b4a9d4d
2 changed files with 12 additions and 0 deletions

View file

@ -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))