cool-easter-32542
04/28/2023, 8:12 AMrun_shell_command(
name='where-am-i-workdir',
command="pwd",
workdir='.'
)
Then the command to run relative to the BUILD file ("`.` specifies the location of the BUILD file.") However,
$ cat src/py/example/BUILD | head -18
run_shell_command(
name='where-am-i',
command="pwd",
)
run_shell_command(
name='where-am-i-workdir',
command="pwd",
workdir='.'
)
run_shell_command(
name='where-am-i-workdir-2',
command="cd {chroot} && pwd",
workdir='.'
)
$ ./pants run src/py/example:where-am-i-workdir
/home/ecsb/src/o/example-python
$ ./pants run src/py/example:where-am-i-workdir-2
/tmp/pants-sandbox-7zAQyl
Neither of which are the "same" (in or out of the sandbox) directory as the BUILD file.
Pants version
2.16.0.dev7
OS
Linux
Additional info
cburroughs/example-python@e27998a
A less contrived pseudo-code example of what I'm trying to do:
run_shell_command(
command="./src.py.example/foo-cli.pex --do-stuff-to-files=my-file.txt",
execution_dependencies=['src/py/example/foo-cli.pex', ':my-text-files'],
workdir='.'
pantsbuild/pantscool-easter-32542
04/28/2023, 8:12 AM