It there a way to get access to the path to a proc...
# plugins
f
It there a way to get access to the path to a process execution environment from within that environment? I guess you could always copy in a script that does
pwd
, but is there a more elegant way to inject that?
I'm guessing probably not, because there's no way to know a tmp dir name before its creation, and it doesn't get created until you
Get
the
Process
c
for interactive processes there is
chroot
that you can interpolate into your argv or env vars, but I guess there isn’t one for sandboxed processes (but there could be) edit: for
run
processes, that is, not generically for all interactive processes.
so guessing it’s not really what you’re looking for here…
f
Yeah... no. But that's okay. It makes sense that this doesn't work for sandboxxed processes.
f
Not that I know of. The Go backend has to run a shell script to use
pwd
to set
GOPATH
since
go
wants an absolute path.
locally we could define a replacement string to substitute in the full path to the input root
but this would not work with remote execution
f
yeah I was thinking that about remote execution as well
f
I thought a bit about proposing an extension to REAPI to provide such a substitution, but the response might just be “run a shell to get that info”
and there is no guarantee that all of the REAPI servers would adopt such a proposal
f
Shell is fine, filling in for problems like this is essentially what shell scripts are for