Hey folks, what's the best way to make Git availab...
# plugins
c
Hey folks, what's the best way to make Git available during a process execution? There's a
GitBinary
, but I don't really know where to but that in a
Process
. (Terraform needs git available to download public modules)
f
Maybe just add (a Terraform backend specific?) ability to set
PATH
when running a Terraforn
Process
if the
--subprocess-environment-env
is not enough?
c
Yeah, that makes sense. We could have the default be to pass Git through. I think this would also be useful for people using provisioners
h
I will once again ring the bell for making
subprocess-environment
live up to its documentation and work on all Process invocations...
I will make a PR
Does the Go backend not also require git for similar reasons?
f
yes at least for module downloads
h
So there's probably prior art to look at there
c
I don't think the golang backend does, I think we ask people to
go mod download all
. I can't find any reference to Git in the golang backend anyhow
f
to clarify,
go
needs
git
only if pulling directly from a git repository (if the version is specified as a commit via the "psuedo-version" mechanism)
normally
go
uses the official Go module proxy maintained by Google to download modules
c
ah, that makes sense. It looks like for cgo, we forward the PATH envvar. doing that would work, and something like that is necessary for provisioners or providers that need other binaries, but it is a bit inelegant. Should we generalise the shell_command.tools? https://www.pantsbuild.org/docs/reference-shell_command#codetoolscode