We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb04e28 commit 5272fd2Copy full SHA for 5272fd2
commitizen/commands/changelog.py
@@ -175,10 +175,17 @@ def _write_changelog(
175
changelog_file.write(changelog_out)
176
177
def _export_template(self) -> None:
178
- tpl = changelog.get_changelog_template(self.cz.template_loader, self.template)
179
- # TODO: fix the following type ignores
180
- src = Path(tpl.filename) # type: ignore[arg-type]
181
- Path(self.export_template_to).write_text(src.read_text()) # type: ignore[arg-type]
+ if self.export_template_to is None:
+ raise NotAllowed("Argument `--export-template` is not set")
+
+ filename = changelog.get_changelog_template(
182
+ self.cz.template_loader, self.template
183
+ ).filename
184
+ if filename is None:
185
+ raise NotAllowed("Template filename is not set")
186
187
+ text = Path(filename).read_text()
188
+ Path(self.export_template_to).write_text(text)
189
190
def __call__(self) -> None:
191
commit_parser = self.cz.commit_parser
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments