<#17404 `experimental_shell_command` substitutes `...
# github-notifications
q
#17404 `experimental_shell_command` substitutes `{chroot}` but does not set `$CHROOT` (nor have docs) New issue created by huonw Describe the bug
experimental_shell_command
seems to substitute
{chroot}
with the sandbox root, which is handy to find dependencies, but it doesn't set the
$CHROOT
environment variable. This behaviour both: • differs to
experimental_run_shell_command
, which also sets the env var • isn't documented at all (https://www.pantsbuild.org/docs/reference-experimental_shell_command doesn't mention "chroot" at all) Example: https://gist.github.com/huonw/5686e2cdccc1d49e4e1e591884574dcc
Copy code
git clone <https://gist.github.com/5686e2cdccc1d49e4e1e591884574dcc.git>
cd 5686e2cdccc1d49e4e1e591884574dcc
./pants run //:b
Output (
#
are my annotations)
Copy code
12:30:38.05 [INFO] Initializing scheduler...
12:30:38.13 [INFO] Scheduler initialized.

# output from "a" (experimental_shell_command):
12:30:38.18 [INFO] env var= sub=/private/var/folders/sv/vd266m4d4lvctgs2wpnhjs9w0000gn/T/pants-sandbox-wmxV9W

# output from "b" (experimental_run_shell_command):
env var=/private/var/folders/sv/vd266m4d4lvctgs2wpnhjs9w0000gn/T/pants-sandbox-uYdVez sub=/private/var/folders/sv/vd266m4d4lvctgs2wpnhjs9w0000gn/T/pants-sandbox-uYdVez
This potentially relates very tangentially to #16807. Pants version 2.15a0 OS macOS Additional info https://gist.github.com/huonw/5686e2cdccc1d49e4e1e591884574dcc pantsbuild/pants