question/feedback: target aliases are nice, but li...
# general
e
question/feedback: target aliases are nice, but limited since they are untyped. I have a
pex_binary
target deep in the filesystem like
foo/bar/baz:bin
and I would love to, at the top-level, say
target(name="baz", dependencies=["foo/bar/baz:bin"])
in order to enable
pants run :baz
. But I get
Copy code
NoApplicableTargetsException: No applicable files or targets matched. The `run` goal works with these target types:

  * pex_binary
  * python_requirement
  * python_source
  * python_test
  * run_shell_command

However, you only specified target arguments with these target types:

  * target
is there another way to do this?
c
Have you looked at the ‘cli.alias’ option? pants.toml: [cli.alias] baz = “foo/bar/baz:bin” Then: pants run baz
e
Ooh that looks great! Thanks!
👍 1