aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2016-09-06 13:05:17 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-09-06 15:39:10 +0000
commitee64285f67418895567c13e3637866511ad42fda (patch)
treebab9024063feb2d52eeb0b862b6e73a475d438fd /src/main/java/com/google/devtools/build/lib
parentd4154604b4843949ff37d944ac5bce9bc1e5412d (diff)
Only call BlazeModule.handleOptions when we're done editing them.
Previously, it was possible for us to edit the options in command.editOptions, after reporting them to the modules, though I don't have any examples of that happening. I found this just looking through the code. -- MOS_MIGRATED_REVID=132310873
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
index aa96cee68a..3ab483ad84 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java
@@ -485,6 +485,9 @@ public class BlazeCommandDispatcher {
reporter.handle(Event.error(e.getMessage()));
return e.getExitCode().getNumericExitCode();
}
+ for (BlazeModule module : runtime.getBlazeModules()) {
+ module.handleOptions(optionsParser);
+ }
// Print warnings for odd options usage
for (String warning : optionsParser.getWarnings()) {
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
index 9786f0f1e7..1ace4adb91 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
@@ -515,9 +515,6 @@ public final class CommandEnvironment {
throw new IllegalStateException(e);
}
}
- for (BlazeModule module : runtime.getBlazeModules()) {
- module.handleOptions(optionsParser);
- }
eventBus.post(new CommandStartEvent(
command.name(), getCommandId(), getClientEnv(), workingDirectory, getDirectories(),