Fix `gn help --root-pattern` This help command didn“t work because the switch was not returned by the switches::GetSwitches() command. This fixes that. Change-Id: I26fd33924bebd4b0a4003c16d025ceeda8072d12 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/18720 Reviewed-by: Takuto Ikuta <tikuta@google.com> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: David Turner <digit@google.com>
diff --git a/docs/reference.md b/docs/reference.md index e48e43d..f8c43a3 100644 --- a/docs/reference.md +++ b/docs/reference.md
@@ -8392,6 +8392,7 @@ * --nocolor: Force non-colored output. * -q: Quiet mode. Don't print output on success. * --root: Explicitly specify source root. + * --root-pattern: Add root pattern override. * --root-target: Override the root target. * --runtime-deps-list-file: Save runtime dependencies for targets in file. * --script-executable: Set the executable used to execute scripts.
diff --git a/src/gn/switches.cc b/src/gn/switches.cc index 67c18a1..bf0c753 100644 --- a/src/gn/switches.cc +++ b/src/gn/switches.cc
@@ -338,6 +338,7 @@ INSERT_VARIABLE(NinjaExecutable) INSERT_VARIABLE(NoColor) INSERT_VARIABLE(Root) + INSERT_VARIABLE(RootPattern) INSERT_VARIABLE(RootTarget) INSERT_VARIABLE(Quiet) INSERT_VARIABLE(RuntimeDepsListFile)