adventurous-air-60679
05/02/2022, 9:14 PMhundreds-father-404
05/02/2022, 9:25 PMBinaryPath
maybe, only it might require extra work. The general idea of BinaryPath
is to use something pre-installed rather than having Pants manage it
What is the tool's layout like? How do you invok it?hundreds-father-404
05/02/2022, 9:25 PM/usr/bin/curl
. BinaryPath
is only meant to make things more flexible that we do some discovery
If it's an internal plugin, you have a lot more flexibility to do "less generalizable" things. Like, simply use /path/to/tool
and make sure everyone in your org has that path
Or, define an option [my-tool].path
that lets users hardcode which path they should useadventurous-air-60679
05/02/2022, 9:29 PMhundreds-father-404
05/02/2022, 9:30 PMhundreds-father-404
05/02/2022, 9:32 PMadventurous-air-60679
05/02/2022, 9:33 PMhundreds-father-404
05/02/2022, 9:33 PMadventurous-air-60679
05/02/2022, 9:35 PMhundreds-father-404
05/02/2022, 9:36 PMBinaryPath
entirely for now. In your Process
, simply do Process(["/path/to/tool", "arg1"])
adventurous-air-60679
05/02/2022, 9:37 PMadventurous-air-60679
05/02/2022, 10:24 PMhundreds-father-404
05/02/2022, 10:26 PMI did have to add my PATH to the Process env for it to work.That would imply that the underlying tool itself expects
PATH
to be set for things to work. That's pretty common.adventurous-air-60679
05/02/2022, 10:27 PMhundreds-father-404
05/02/2022, 10:29 PMPATH
makes you set PATH=/usr/bin
to access a binary like /usr/bin/tar
. This helper will create a shim that only exposes the specific binaries you want https://github.com/pantsbuild/pants/pull/14374hundreds-father-404
05/02/2022, 10:29 PMadventurous-air-60679
05/02/2022, 10:30 PM