Skip to content

Commit d4d3016

Browse files
committed
Call mkdocs using -m
There are some cases were rtd uses the old installed version of mkdocs instead of the one installed by the user, like in readthedocs#5532 (comment) Which gives an error because it's using a yaml file supported only in new mkdocs versions. This is similar to readthedocs#5107
1 parent 44951fb commit d4d3016

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

readthedocs/doc_builder/backends/mkdocs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,9 @@ def generate_rtd_data(self, docs_dir, mkdocs_config):
247247
def build(self):
248248
checkout_path = self.project.checkout_path(self.version.slug)
249249
build_command = [
250-
'python',
251-
self.python_env.venv_bin(filename='mkdocs'),
250+
self.venv_bin(filename='python'),
251+
'-m',
252+
'mkdocs',
252253
self.builder,
253254
'--clean',
254255
'--site-dir',

0 commit comments

Comments
 (0)