Skip to content

Commit 202ce9e

Browse files
committed
amended mkdocs missing message to allign with sphinx
1 parent ade2e8f commit 202ce9e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readthedocs/doc_builder/backends/mkdocs.py

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
from readthedocs.core.utils.filesystem import safe_open
1414
from readthedocs.doc_builder.base import BaseBuilder
15+
from readthedocs.doc_builder.exceptions import MkDocsYAMLParseError
1516
from readthedocs.projects.constants import MKDOCS, MKDOCS_HTML
1617

1718
log = structlog.get_logger(__name__)
@@ -80,6 +81,12 @@ def get_yaml_config(self):
8081
def show_conf(self):
8182
"""Show the current ``mkdocs.yaml`` being used."""
8283
# Write the mkdocs.yml to the build logs
84+
if not os.path.exists(self.yaml_file):
85+
raise MkDocsYAMLParseError(
86+
message_id=MkDocsYAMLParseError.NOT_FOUND,
87+
88+
)
89+
8390
self.run(
8491
"cat",
8592
os.path.relpath(self.yaml_file, self.project_path),

0 commit comments

Comments
 (0)