is there any reason why binaries run with `./pants...
# development
h
is there any reason why binaries run with
./pants run
have to have their working directory set to the build root? I built the
InteractiveProcessRunner
to do this because v1 pants did this, but is there any actual requirement that programs have to run there?
e
No reason I can think of. It's probably a good default though, since it would seem more likely than not that a binary that operated on file paths would often be run against files in the build root.
h
okay, that makes sense
this question came up in the context of https://github.com/pantsbuild/pants/pull/8855
which adds an
input_files: Digest
field to InteractiveProcessRunner, analogous to the one on ExecuteProcessRequest
interactive processes either run in teh buildroot or in a tmpdir, and we need something like
input_files
to materialize files to the build root. but I had thought that we might not want to materialize files this way when we run an interactive process in teh build root, for fear that it would be too easy to accidentally clobber source files