diff options
author | 2016-04-14 17:56:38 +0000 | |
---|---|---|
committer | 2016-04-15 07:37:15 +0000 | |
commit | 1bfeec6cac7cdc704083ed9f8124469096e5db8b (patch) | |
tree | 5fea31962e8a34169b2a46867cd30af406fd9c71 /src/main/java/com/google/devtools/build/lib/runtime/commands | |
parent | 6ffb8e455fb8661005dcb24cf8cc1e60a2c9bda7 (diff) |
Add an afterCommand hook to AbstractBlazeQueryEnvironment.
--
MOS_MIGRATED_REVID=119868282
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java index 1302112a9d..cf857fd810 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java @@ -196,6 +196,7 @@ public final class QueryCommand implements BlazeCommand { if (!catastrophe) { if (streamResults) { output.flush(); + queryEnv.afterCommand(); } try { callback.close(); @@ -225,6 +226,7 @@ public final class QueryCommand implements BlazeCommand { env.getReporter().handle(Event.error("I/O error: " + e.getMessage())); return ExitCode.LOCAL_ENVIRONMENTAL_ERROR; } finally { + queryEnv.afterCommand(); // Note that PrintStream#checkError first flushes and then returns whether any // error was ever encountered. if (output.checkError()) { |