https://pantsbuild.org/ logo
#general
Title
# general
m

modern-manchester-33562

12/05/2022, 4:37 PM
Is there a way to go back to the old way Pants generated the command at the top of the lockfile header? Some versions ago it was relative e.g.
./pants generate-lockfiles --resolve=my-resolve
. Recently it's become an absolute path which is quite annoying.
đź‘€ 1
h

happy-kitchen-89482

12/05/2022, 6:13 PM
That seems inadvertent. I don’t recall any decision to do so, and it wouldn’t make sense. Can you file a bug?
c

curved-television-6568

12/05/2022, 6:16 PM
any change in how you invoked pants when you generated the lockfile?
and
PANTS_BIN_NAME
may affect this as well.. but haven’t been changed in Pants for a long time either, so my hunch is that this is a change outside of Pants..
m

modern-manchester-33562

12/06/2022, 8:56 AM
Thank you @curved-television-6568! That pointed me in the right direction. This seems to be due to the type of shell one is using. Bash indeed sets
PANTS_BIN_NAME
to the value actually invoked, in our case
./pants
. Other shells, like fish (the one I'm using), converts this to an absolute path e.g.,
/home/johan/project/pants
. In short, this is no fault of pants and it looks like we need to work around this in another way :)
3 Views