Split BlazeModule.getCommandOptions into two; unify all implementations.
Several modules now explicitly add common command options. Of the remaining
ones, most add options to the build command, except one, which adds options
to query. They now all use the canonical implementation.
Also updated the documentation to clarify what this method actually does.
--
MOS_MIGRATED_REVID=125560058
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxModule.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxModule.java
index 7187937..04f6169 100644
--- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxModule.java
+++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxModule.java
@@ -85,7 +85,7 @@
@Override
public Iterable<Class<? extends OptionsBase>> getCommandOptions(Command command) {
- return command.builds()
+ return "build".equals(command.name())
? ImmutableList.<Class<? extends OptionsBase>>of(SandboxOptions.class)
: ImmutableList.<Class<? extends OptionsBase>>of();
}