Skip to content

Commit

Permalink
Set correct output_path for bazel info
Browse files Browse the repository at this point in the history
Fixes bazelbuild#3055.

RELNOTES: `bazel info output_path` no longer relies on the root directory
filename being equal to the workspace name.
PiperOrigin-RevId: 164847833
  • Loading branch information
Googler authored and hlopko committed Aug 11, 2017
1 parent ab21d18 commit db55b5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ public OutputPathInfoItem() {
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()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/shell/bazel/client_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\$"
}

0 comments on commit db55b5a

Please sign in to comment.