mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Make compile_catalog actually fail on error, to catch it in CI (#2979)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from distutils.errors import DistutilsOptionError
|
||||
from os import path
|
||||
|
||||
@@ -31,6 +32,12 @@ class compile_catalog(babel.compile_catalog, ThemeMixin):
|
||||
("theme=", "t", "theme name to work on"),
|
||||
]
|
||||
|
||||
def run(self):
|
||||
# Possible bug in Babel - produces unused return value:
|
||||
# https://github.com/python-babel/babel/blob/v2.10.3/babel/messages/frontend.py#L194
|
||||
if super().run():
|
||||
sys.exit(1)
|
||||
|
||||
def initialize_options(self):
|
||||
super().initialize_options()
|
||||
self.theme = None
|
||||
|
||||
Reference in New Issue
Block a user