From f151ddc8b93f5b2cd8e675f727f5ba22248bd100 Mon Sep 17 00:00:00 2001 From: sdarwin Date: Wed, 4 Feb 2026 12:08:53 -0700 Subject: [PATCH] build_docs: conditionally install mermaid --- build_docs/linuxdocs.sh | 5 +++-- build_docs/macosdocs.sh | 4 +++- build_docs/windowsdocs.ps1 | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build_docs/linuxdocs.sh b/build_docs/linuxdocs.sh index d3e44d5..f6fe46e 100755 --- a/build_docs/linuxdocs.sh +++ b/build_docs/linuxdocs.sh @@ -217,8 +217,9 @@ if [ "$skippackagesoption" != "yes" ]; then node --version npm --version npm install gulp-cli@2.3.0 - npm install @mermaid-js/mermaid-cli@10.5.1 - + if grep -r mermaid "$BOOST_SRC_FOLDER/doc/"; then + npm install @mermaid-js/mermaid-cli@10.5.1 + fi fi if [ "$typeoption" = "cppalv1" ]; then diff --git a/build_docs/macosdocs.sh b/build_docs/macosdocs.sh index 5319a99..d665058 100755 --- a/build_docs/macosdocs.sh +++ b/build_docs/macosdocs.sh @@ -267,7 +267,9 @@ if [ "$skippackagesoption" != "yes" ]; then node --version npm --version npm install gulp-cli@2.3.0 - npm install @mermaid-js/mermaid-cli@10.5.1 + if grep -r mermaid "$BOOST_SRC_FOLDER/doc/"; then + npm install @mermaid-js/mermaid-cli@10.5.1 + fi fi brew install ruby diff --git a/build_docs/windowsdocs.ps1 b/build_docs/windowsdocs.ps1 index bfde11a..bee11bd 100755 --- a/build_docs/windowsdocs.ps1 +++ b/build_docs/windowsdocs.ps1 @@ -417,7 +417,11 @@ if ( -Not ${skip-packages} ) { } npm install gulp-cli@2.3.0 - npm install @mermaid-js/mermaid-cli@10.5.1 + + # need to check this code: + if (Get-ChildItem -Path "$BOOST_SRC_FOLDER/doc/" -Recurse -File | Select-String -Pattern "mermaid" -Quiet) { + npm install @mermaid-js/mermaid-cli@10.5.1 + } }