From 65f6ead3f002f83a315482dcbaca7caa3aa0feb2 Mon Sep 17 00:00:00 2001 From: Martin Fraga Date: Wed, 22 May 2024 17:05:28 -0300 Subject: [PATCH] fix: only write masm documentation when it's not docs.rs building the documentation (#1341) --- stdlib/build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stdlib/build.rs b/stdlib/build.rs index 69b9a6b58b..94f34bc4a5 100644 --- a/stdlib/build.rs +++ b/stdlib/build.rs @@ -40,8 +40,11 @@ fn main() -> io::Result<()> { let build_dir = env::var("OUT_DIR").unwrap(); stdlib.write_to_dir(Path::new(&build_dir).join(ASL_DIR_PATH))?; - // updates the documentation of these modules - build_stdlib_docs(&docs, DOC_DIR_PATH)?; + // updates the documentation of these modules. Only do so when this is not docs.rs building the + // documentation. + if env::var("DOCS_RS").is_err() { + build_stdlib_docs(&docs, DOC_DIR_PATH)?; + } Ok(()) }