aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2018-02-05 07:59:13 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-05 08:01:17 -0800
commit4741aa83145fd2d3ab0599314f7732c5b80977bd (patch)
treeb33310e226d9733ae0e538e433a54e337d6a67ed /src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java
parent03ad9155f765fcdc0ccf4aae30a4def9914ea0b4 (diff)
Add a "direct" mode to "blaze run" that makes the process being run a direct
child of the process where the Blaze client itself was run. Limitations: - Untested on Windows; it should work because ExecuteProgram() is implemented there, too, but since Windows doesn't support exec(), there is at least one process in between Progress towards #2815. RELNOTES[NEW]: The new "--direct_run" flag on "blaze run" lets one run interactive binaries. PiperOrigin-RevId: 184528845
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java
index b735107e79..7ad512acb6 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/LicenseCommand.java
@@ -16,6 +16,7 @@ package com.google.devtools.build.lib.runtime.commands;
import com.google.common.io.Files;
import com.google.devtools.build.lib.analysis.NoBuildEvent;
import com.google.devtools.build.lib.runtime.BlazeCommand;
+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;
@@ -52,7 +53,7 @@ public class LicenseCommand implements BlazeCommand {
}
@Override
- public ExitCode exec(CommandEnvironment env, OptionsProvider options) {
+ public BlazeCommandResult exec(CommandEnvironment env, OptionsProvider options) {
env.getEventBus().post(new NoBuildEvent());
OutErr outErr = env.getReporter().getOutErr();
@@ -81,7 +82,7 @@ public class LicenseCommand implements BlazeCommand {
printJavaLicenseFiles(outErr, bundledJre);
}
- return ExitCode.SUCCESS;
+ return BlazeCommandResult.exitCode(ExitCode.SUCCESS);
}
private static void printJavaLicenseFiles(OutErr outErr, Path bundledJdkOrJre) {