Make 'mach doc' not fail when components/servo/target doesn’t exist.

This commit is contained in:
Simon Sapin 2014-12-03 15:50:21 -08:00
parent 96c3c6fd43
commit 7efad39ccd

View file

@ -80,9 +80,10 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped()
rust_docs = path.join(self.config["tools"]["rust-root"], "doc")
docs = path.join("components", "servo", "target", "doc")
docs = path.join(
self.context.topdir, "components", "servo", "target", "doc")
if not path.exists(docs):
os.mkdir(docs)
os.makedirs(docs)
if read_file(path.join(docs, "version_info.html"), if_exists=True) != \
read_file(path.join(rust_docs, "version_info.html")):