Skip to content

Commit

Permalink
Call mkdocs using -m
Browse files Browse the repository at this point in the history
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
  • Loading branch information
stsewd committed Mar 27, 2019
1 parent 44951fb commit b642e90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions readthedocs/doc_builder/backends/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ def generate_rtd_data(self, docs_dir, mkdocs_config):
def build(self):
checkout_path = self.project.checkout_path(self.version.slug)
build_command = [
'python',
self.python_env.venv_bin(filename='mkdocs'),
self.python_env.venv_bin(filename='python'),
'-m',
'mkdocs',
self.builder,
'--clean',
'--site-dir',
Expand Down

0 comments on commit b642e90

Please sign in to comment.