From 2f1230d7ba3a95a10e6e64af6345862ea96bfe14 Mon Sep 17 00:00:00 2001 From: Piotr Rogoza Date: Tue, 17 Mar 2026 09:22:04 +0100 Subject: [PATCH] fix(customize): resolve info_path relative to root config --- commitizen/cz/customize/customize.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commitizen/cz/customize/customize.py b/commitizen/cz/customize/customize.py index 8fcc63fac..b5ba8f947 100644 --- a/commitizen/cz/customize/customize.py +++ b/commitizen/cz/customize/customize.py @@ -69,5 +69,8 @@ def schema(self) -> str: def info(self) -> str: if info_path := self.custom_settings.get("info_path"): - return Path(info_path).read_text(encoding=self.config.settings["encoding"]) + info_file = Path(info_path) + if not info_file.is_absolute(): + info_file = self.config.path.parent / info_file + return info_file.read_text(encoding=self.config.settings["encoding"]) return self.custom_settings.get("info") or ""