Is there any way to refer to pants targets relativ...
# general
c
Is there any way to refer to pants targets relative to the current working directory? Coming from bazel, I'm used to doing things like
bazel run :myapp
to run the target named
myapp
in the current directory's
BUILD
file. It doesn't seem like that's possible with pants? I've only been able to successfully refer to targets with a fully-qualified name.
b
Not yet, but it's a highly requested feature and I know of at least one PoC
1
c
Ooh, that looks useful! Definitely a step above my current pants wrapper, which is just a shell function that lets me run it from any directory.
Copy code
pants () {
        local git_root="$(git rev-parse --show-toplevel)"
        if [[ -z "$git_root" ]]
        then
                return 1
        fi
        "${git_root}/pants" "$@"
}