https://pantsbuild.org/ logo
f

flat-zoo-31952

01/13/2023, 7:03 PM
Is there an option that controls whether Pants resolves the path of bootstrap script in suggestions? Sometimes it seems to be putting this in stuff I commit in things it generates (like lockfiles), and I don't really want my local repo path being committed to code... example:
Copy code
// This lockfile was autogenerated by Pants. To regenerate, run:
//
//    /home/jreed/devel/aiven/aiven-core/pants generate-lockfiles --resolve=pylint
I'd rather it just say
./pants
tbh. Is that possible?
h

high-yak-85899

01/13/2023, 7:05 PM
You can use
--custom-command
to change it
See here
f

flat-zoo-31952

01/13/2023, 7:08 PM
Thanks. That documentation seems to suggest that the default should be
./pants
though:
If set, lockfile headers will say to run this command to regenerate the lockfile, rather than running
./pants generate-lockfiles --resolve=<name>
like normal.
h

high-yak-85899

01/13/2023, 7:09 PM
That's not quite how I interpret that
But I do see where you're coming from
e

enough-analyst-54434

01/13/2023, 7:21 PM
I don't think anyone would complain if you fixed the default to be
./pants
like the docs say @flat-zoo-31952
f

flat-zoo-31952

01/13/2023, 7:23 PM
Is there an issue? If not I'll create one. And I can take a look at that yeah. It does this for auto-suggestion too, when you run the wrong command, I think it's probably the same underlying library that's doing this, but I'd have to dig deeper to know for sure
e

enough-analyst-54434

01/13/2023, 7:23 PM
No clue, your search is as good as mine there.
h

happy-kitchen-89482

01/13/2023, 7:36 PM
Yeah that seems like a bug, not what we actually want
f

flat-zoo-31952

01/13/2023, 7:52 PM
yummy yummy more bugs in my tummy
🐛 1
c

careful-address-89803

01/13/2023, 10:41 PM
I think some shells set the process name differently, so you get the absolute path instead of the relative path. Fish does this.
f

fresh-cat-90827

01/13/2023, 11:25 PM
FWIW I don't get it expanded to the full path on zsh, it's
./pants generate-lockfiles --resolve=mypy
c

careful-address-89803

01/14/2023, 12:55 AM
6 Views