Skip to content

Commit 2f1230d

Browse files
committed
fix(customize): resolve info_path relative to root config
1 parent 818fa1a commit 2f1230d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

commitizen/cz/customize/customize.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ def schema(self) -> str:
6969

7070
def info(self) -> str:
7171
if info_path := self.custom_settings.get("info_path"):
72-
return Path(info_path).read_text(encoding=self.config.settings["encoding"])
72+
info_file = Path(info_path)
73+
if not info_file.is_absolute():
74+
info_file = self.config.path.parent / info_file
75+
return info_file.read_text(encoding=self.config.settings["encoding"])
7376
return self.custom_settings.get("info") or ""

0 commit comments

Comments
 (0)