Skip to content

Commit

Permalink
Add the --owner-of= usage on Target Address documentation (pantsbuild…
Browse files Browse the repository at this point in the history
…#5931)

Problem
The documentation of the feature proposed in PR pantsbuild#5930

Solution
I decided to put it inside Target Addresses because that is where a user would look if they needed a feature like this, I think.

Result
More docs, and that's always good.
  • Loading branch information
alanbato authored and kwlzn committed Jun 10, 2018
1 parent 52f9faa commit f6788e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/docs/target_addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ The following target addresses all specify the same single target.

It's idiomatic to omit the repetition of the target name in this case.

- If the address of the target that owns a certain file is not known, the `--owner-of=` global
option can be passed to run the goal on the target which own that file.

::::bash
$ ./pants --owner-of=examples/src/java/org/pantsbuild/example/hello/main/HelloMain.java list
examples/src/java/org/pantsbuild/example/hello/main:main

It's also worth noting that multiple passes of `owner-of=` are accepted in order to work with multiple
files and pants will execute the goal on all the targets that own those files.

- Relative paths and trailing forward slashes are ignored on the
command-line to accommodate tab completion:

Expand Down

0 comments on commit f6788e2

Please sign in to comment.