aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
index 1a0f8defe4..26eafa4062 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/DumpCommand.java
@@ -22,6 +22,7 @@ import com.google.devtools.build.lib.runtime.BlazeCommand;
import com.google.devtools.build.lib.runtime.BlazeCommandUtils;
import com.google.devtools.build.lib.runtime.BlazeRuntime;
import com.google.devtools.build.lib.runtime.Command;
+import com.google.devtools.build.lib.runtime.CommandEnvironment;
import com.google.devtools.build.lib.util.ExitCode;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.common.options.EnumConverter;
@@ -55,7 +56,7 @@ public class DumpCommand implements BlazeCommand {
/**
* NB! Any changes to this class must be kept in sync with anyOutput variable
- * value in the {@link DumpCommand#exec(BlazeRuntime,OptionsProvider)} method below.
+ * value in the {@link DumpCommand#exec(CommandEnvironment,OptionsProvider)} method below.
*/
public static class DumpOptions extends OptionsBase {
@@ -116,10 +117,11 @@ public class DumpCommand implements BlazeCommand {
}
@Override
- public void editOptions(BlazeRuntime runtime, OptionsParser optionsParser) {}
+ public void editOptions(CommandEnvironment env, OptionsParser optionsParser) {}
@Override
- public ExitCode exec(BlazeRuntime runtime, OptionsProvider options) {
+ public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
+ BlazeRuntime runtime = env.getRuntime();
DumpOptions dumpOptions = options.getOptions(DumpOptions.class);
boolean anyOutput = dumpOptions.dumpPackages || dumpOptions.dumpVfs
@@ -131,14 +133,14 @@ public class DumpCommand implements BlazeCommand {
Collection<Class<? extends OptionsBase>> optionList = new ArrayList<>();
optionList.add(DumpOptions.class);
- runtime.getReporter().getOutErr().printErrLn(BlazeCommandUtils.expandHelpTopic(
+ env.getReporter().getOutErr().printErrLn(BlazeCommandUtils.expandHelpTopic(
getClass().getAnnotation(Command.class).name(),
getClass().getAnnotation(Command.class).help(),
getClass(),
optionList, categories, OptionsParser.HelpVerbosity.LONG));
return ExitCode.ANALYSIS_FAILURE;
}
- PrintStream out = new PrintStream(runtime.getReporter().getOutErr().getOutputStream());
+ PrintStream out = new PrintStream(env.getReporter().getOutErr().getOutputStream());
try {
out.println("Warning: this information is intended for consumption by developers");
out.println("only, and may change at any time. Script against it at your own risk!");
@@ -158,7 +160,7 @@ public class DumpCommand implements BlazeCommand {
if (dumpOptions.dumpArtifacts) {
success = false;
- runtime.getReporter().handle(Event.error("Cannot dump artifacts in Skyframe full mode. "
+ env.getReporter().handle(Event.error("Cannot dump artifacts in Skyframe full mode. "
+ "Use --skyframe instead"));
}