mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Add new enironment variable PRE_COMMIT_CONFIG_PATH
This commit is contained in:
parent
cb14bc2d9c
commit
0a39f54c77
1 changed files with 4 additions and 0 deletions
|
|
@ -412,6 +412,10 @@ def run(
|
|||
if args.rewrite_command:
|
||||
environ['PRE_COMMIT_REWRITE_COMMAND'] = args.rewrite_command
|
||||
|
||||
environ['PRE_COMMIT_CONFIG_PATH'] = (
|
||||
os.path.dirname(os.path.abspath(config_file))
|
||||
)
|
||||
|
||||
# Set pre_commit flag
|
||||
environ['PRE_COMMIT'] = '1'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue