Any clue why ```$ pants Unknown goal: bash``` ? I'...
# general
h
Any clue why
Copy code
$ pants
Unknown goal: bash
? I'm using
zsh
. Also, I can't seem to enable auto-completion support, and I suspect it's related.
c
that looks weird, and slightly sus. alias? i.e. what if you try:
Copy code
$ 'pants'
if that doesn't help, what does:
which pants
give you?
h
“Unknown goal” indicates that under the covers, the pants binary is seeing
pants bash
somehow
h
No alias, it seems. I see this on a MacOS system, and on a Linux Ubuntu system. I see it on zsh, bash and sh.
pants foo
: Unknown goal foo.
Only empty translates to bash, somehow.
c
huh, you know, I also get "unknown goal: bash" if I run just
pants
without any goal specified. So you're probably good to go. Try
pants version
if you just want to verify your setup.
That's not very helpful, and feels like a bug too, so if you don't mind filing an issue for it over at https://github.com/pantsbuild/pants/issues I'm sure that would be appreciated 😉
h
Huh, I don’t get this, but I’m running in a bash shell. @curved-television-6568 are you on
zsh
? And @hundreds-lion-13128, what happens if you run in bash shell on the same machine?
On bash I get
Copy code
No goals specified.
Use `pants help` to get help.
Use `pants help goals` to list goals.
c
Yea, Im on zsh.
h
OK, so evidently some cross-shell hankypanky
h
I noticed this issue on zsh. When I
exec bash
, then run, I see it still.
Copy code
pants --version
2.22.1
c
yea, I repro this also using bash. I also repro the case where I don't get this issue, on the same versions of pants. So this is a env/external thing.. I'll do some light digging see what I can unearth. Seems like a fluke I got this at all 😛
this is related to the presence of the
.pants.bootstrap
file, likely how that interacts with
scie-pants
loading the env from it before exec'ing pants.
Copy code
❯ pants                              
BOOTSTRAP: prog=bash args=
Unknown goal: bash
Use `pants help` to get help.
Use `pants help goals` to list goals.
errno:1 
❯ pants -linfo
BOOTSTRAP: prog=-linfo args=
No goals specified.
Use `pants help` to get help.
Use `pants help goals` to list goals.
errno:1
Using a
.pants.bootstrap
with:
Copy code
echo "BOOTSTRAP: prog=$0 args=$@"
h
aha
c
to be clear, I'm not currently looking into this further.. 😉
h
Thanks for figuring this out. So I'll assume it's an innocent byproduct of the bootstrap file.
c
yea. not sure about the innocent part, but it exposed a bug in the bootstrap process with it present, yes. But it's likely mostly cosmetic, as there's no point in running a bare
pants
with no goals, afaik.