From 95aa487c02e20c6e0e137fca1670fc72ec9bd588 Mon Sep 17 00:00:00 2001 From: ulfjack Date: Tue, 6 Jun 2017 09:32:18 -0400 Subject: Remove the CommandEnvironment from BlazeCommand.editOptions BlazeCommand.editOptions is currently called fairly late in the startup process, so it must be restrictive in what it does, as any change to the options can potentially introduce inconsistencies between different parts of Bazel. Removing the CommandEnvironment reduces the amount of damage it can do, and may allow us to move the call earlier in the startup process (maybe even to a point where the CommandEnvironment does not exist yet). PiperOrigin-RevId: 158133862 --- .../com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java') 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 3b230a2e54..d2b05f32ff 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 @@ -518,7 +518,7 @@ public class BlazeCommandDispatcher { waitTimeInMs, invocationPolicy); // Allow the command to edit options after parsing: - command.editOptions(env, optionsParser); + command.editOptions(optionsParser); } catch (AbruptExitException e) { reporter.handle(Event.error(e.getMessage())); return e.getExitCode().getNumericExitCode(); -- cgit v1.2.3