aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
index 09423c0b56..f242c9d7ce 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/ShutdownCommand.java
@@ -15,6 +15,7 @@ package com.google.devtools.build.lib.runtime.commands;
import com.google.devtools.build.lib.runtime.BlazeCommand;
import com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.ShutdownBlazeServerException;
+import com.google.devtools.build.lib.runtime.BlazeCommandResult;
import com.google.devtools.build.lib.runtime.Command;
import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.util.ExitCode;
@@ -56,7 +57,7 @@ public final class ShutdownCommand implements BlazeCommand {
public void editOptions(OptionsParser optionsParser) {}
@Override
- public ExitCode exec(CommandEnvironment env, OptionsProvider options)
+ public BlazeCommandResult exec(CommandEnvironment env, OptionsProvider options)
throws ShutdownBlazeServerException {
int limit = options.getOptions(Options.class).heapSizeLimit;
@@ -69,9 +70,9 @@ public final class ShutdownCommand implements BlazeCommand {
if (limit == 0 ||
Runtime.getRuntime().totalMemory() > limit * 1000L * 1000) {
- throw new ShutdownBlazeServerException(0);
+ throw new ShutdownBlazeServerException(ExitCode.SUCCESS);
}
- return ExitCode.SUCCESS;
+ return BlazeCommandResult.exitCode(ExitCode.SUCCESS);
}
}