From 6703855ee36df1e46a80926b5056620f7dae108c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 29 Aug 2024 14:10:04 +0200 Subject: [PATCH] What's up with docs --- xtask/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index bbec3a47e3d..112104c78f7 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -341,10 +341,12 @@ fn build_documentation(workspace: &Path, args: BuildDocumentationArgs) -> Result } // Copy any additional assets to the documentation's output path: - fs::copy(resources.join("esp-rs.svg"), output_path.join("esp-rs.svg"))?; + fs::copy(resources.join("esp-rs.svg"), output_path.join("esp-rs.svg")) + .context("Failed to copy esp-rs.svg")?; // Render the index and write it out to the documentaiton's output path: - let source = fs::read_to_string(resources.join("index.html.jinja"))?; + let source = fs::read_to_string(resources.join("index.html.jinja")) + .context("Failed to read index.html.jinja")?; let mut env = minijinja::Environment::new(); env.add_template("index", &source)?; @@ -352,7 +354,7 @@ fn build_documentation(workspace: &Path, args: BuildDocumentationArgs) -> Result let tmpl = env.get_template("index")?; let html = tmpl.render(minijinja::context! { packages => packages })?; - fs::write(output_path.join("index.html"), html)?; + fs::write(output_path.join("index.html"), html).context("Failed to write index.html")?; Ok(()) }