diff options
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()) { |