From 1a578e35aee976c35b5ee82d3b211327e24b0dac Mon Sep 17 00:00:00 2001 From: ogiorgis Date: Fri, 17 Feb 2023 13:33:50 +0000 Subject: [PATCH] Bug 1678710 - Add a warning when creating the entire docs r=firefox-source-docs-reviewers,ahal DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D169077 --- tools/moztreedocs/mach_commands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/moztreedocs/mach_commands.py b/tools/moztreedocs/mach_commands.py index 6dd2a3b0c807..55aed0436c88 100644 --- a/tools/moztreedocs/mach_commands.py +++ b/tools/moztreedocs/mach_commands.py @@ -157,7 +157,15 @@ def build_docs( outdir = outdir or os.path.join(command_context.topobjdir, "docs") savedir = os.path.join(outdir, fmt) - path = path or command_context.topsrcdir + if path is None: + path = command_context.topsrcdir + if os.environ.get("MOZ_AUTOMATION") != "1": + print( + "\nBuilding the full documentation tree." + "Did you mean to only build part of the documentation?\n" + "For a faster command, consider running:\n" + " ./mach doc path/to/docs\n" + ) path = os.path.normpath(os.path.abspath(path)) docdir = _find_doc_dir(path)