From 40d9c78180285901dd9486a550bdf0fae7eb06eb Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Wed, 18 Dec 2024 01:57:24 +0000 Subject: [PATCH] feat(config): read config path from env --- pre_commit/constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pre_commit/constants.py b/pre_commit/constants.py index 79a9bb69..ae9e5767 100644 --- a/pre_commit/constants.py +++ b/pre_commit/constants.py @@ -1,9 +1,10 @@ from __future__ import annotations +import os import importlib.metadata -CONFIG_FILE = '.pre-commit-config.yaml' -MANIFEST_FILE = '.pre-commit-hooks.yaml' +CONFIG_FILE = os.getenv('PRE_COMMIT_CONFIG_FILE', '.pre-commit-config.yaml') +MANIFEST_FILE = os.getenv('PRE_COMMIT_MANIFEST_FILE', '.pre-commit-hooks.yaml') # Bump when modifying `empty_template` LOCAL_REPO_VERSION = '1'