aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-04-19 07:43:10 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-19 09:48:16 +0000
commitb7e1004952dcb319963a2c426f43b975dcb31644 (patch)
tree2ea4444347f5b04a3e6987a827c4b4a05aedaaea /src/main/java/com/google/devtools/build
parentf1df38a5131a06a8b7047b99a5f887938e5a7623 (diff)
Signal that the version command does not build
The version command is not expected to every run any actions. Hence any messages about progress of the build process or running actions would be confusing. Therefore, signal this fact to allow the experimental UI to present information accordingly. -- Change-Id: I8a75704a39e161f52c4d008677f62e4b36097647 Reviewed-on: https://bazel-review.googlesource.com/#/c/3387 MOS_MIGRATED_REVID=120203058
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/VersionCommand.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/VersionCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/VersionCommand.java
index ac75f8f528..97f3cc1358 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/VersionCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/VersionCommand.java
@@ -14,6 +14,7 @@
package com.google.devtools.build.lib.runtime.commands;
import com.google.devtools.build.lib.analysis.BlazeVersionInfo;
+import com.google.devtools.build.lib.analysis.NoBuildEvent;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.runtime.BlazeCommand;
import com.google.devtools.build.lib.runtime.Command;
@@ -43,6 +44,7 @@ public final class VersionCommand implements BlazeCommand {
env.getReporter().handle(Event.error("Version information not available"));
return ExitCode.COMMAND_LINE_ERROR;
}
+ env.getEventBus().post(new NoBuildEvent());
env.getReporter().getOutErr().printOutLn(info.getSummary());
return ExitCode.SUCCESS;
}