quaint-telephone-89068
01/09/2023, 5:24 PM../../some/dir. I tried putting an experimental_shell_command into the same directory as the script with outputs=["../../some/dir"], but that failed with error Relative paths that escape the root are not allowed.
To get things working, I had to move the experimental_shell_command to the root of my repo and set the command to "cd path/to/script/dir && ./script" (the script unfortunately cares that it's run from the same directory). I was then able to set outputs=["some/dir/"].
Describe the solution you'd like
It makes sense to me that shell commands can't write outputs to parent dirs, but it would be nice if there was a cleaner way to say "run this command in a subdir workdir". A work_directory field on experimental_shell_command would do the trick, I think.
Describe alternatives you've considered
Things seem to work fine with the cd so we aren't blocked, it's just messy and raised some eyebrows during review.
pantsbuild/pantsuser
01/09/2023, 5:24 PM