diff options
author | Alex Eagle <eagle@post.harvard.edu> | 2022-08-22 09:18:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 12:18:01 -0400 |
commit | 6fe8c2ed2550b51129e16dd7c80b0efd8a59129f (patch) | |
tree | 5a53f1eb223ac20de15caececd91ac646cf0c077 | |
parent | 7f7bcf9c93bed9ee693b5bfedde5d72f9a2d6ea4 (diff) | |
download | bazelbuild-rules_pkg-6fe8c2ed2550b51129e16dd7c80b0efd8a59129f.tar.gz |
Mention the new --output=files (#608)
-rw-r--r-- | examples/where_is_my_output/README.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/where_is_my_output/README.md b/examples/where_is_my_output/README.md index 4000676..feb1f86 100644 --- a/examples/where_is_my_output/README.md +++ b/examples/where_is_my_output/README.md @@ -17,6 +17,10 @@ provide all the tools we need to get the precise path of an output. ## Using cquery to find the exact path to the outputs created for a target. We can use Bazel's cquery command to find information about a target. + +In Bazel 5.3.0 or later, there is a [`--output=files` flag](https://bazel.build/query/cquery#files-output) that provides this info directly. ([PR](https://github.com/bazelbuild/bazel/pull/15552)) + +Older versions of Bazel require a small Starlark program to be supplied. Specifically we use [cquery's Starlark output](https://docs.bazel.build/versions/main/cquery.html#cquery-starlark-dialect) to inspect a target and print exactly what we need. Let's try it: |