diff options
author | 2017-08-10 15:46:16 +0200 | |
---|---|---|
committer | 2017-08-11 12:53:17 +0200 | |
commit | db55b5a9f6d56535a909bd777b7f803a99d9dbd9 (patch) | |
tree | bf28f5b6a806ed0eccccbd54dcb4bbc942c26b19 | |
parent | ab21d18ddb5b53e887b4fd51ddc5d021621673d4 (diff) |
Set correct output_path for bazel info
Fixes #3055.
RELNOTES: `bazel info output_path` no longer relies on the root directory
filename being equal to the workspace name.
PiperOrigin-RevId: 164847833
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java | 3 | ||||
-rwxr-xr-x | src/test/shell/bazel/client_test.sh | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java index 57de6f87b1..fd91fab474 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/InfoItem.java @@ -199,7 +199,8 @@ public abstract class InfoItem { public byte[] get(Supplier<BuildConfiguration> configurationSupplier, CommandEnvironment env) throws AbruptExitException { checkNotNull(env); - return print(env.getRuntime().getWorkspace().getOutputPath()); + return print( + env.getDirectories().getOutputPath(configurationSupplier.get().getMainRepositoryName())); } } diff --git a/src/test/shell/bazel/client_test.sh b/src/test/shell/bazel/client_test.sh index b38c40a80f..c04acbbdd9 100755 --- a/src/test/shell/bazel/client_test.sh +++ b/src/test/shell/bazel/client_test.sh @@ -30,6 +30,6 @@ EOF expect_log "^bazel-bin:.*_bazel.*bazel-out.*bin\$" expect_log "^bazel-genfiles:.*_bazel.*bazel-out.*genfiles\$" expect_log "^bazel-testlogs:.*_bazel.*bazel-out.*testlogs\$" - expect_log "^output_path:.*_bazel.*bazel-out\$" + expect_log "^output_path:.*/execroot/blerp/bazel-out\$" expect_log "^execution_root:.*/execroot/blerp\$" } |