<#19017 `AdhocProcessRequest` isn't replacing `$0`...
# github-notifications
c
#19017 `AdhocProcessRequest` isn't replacing `$0` correctly Issue created by thejcannon Describe the bug From https://pantsbuild.slack.com/archives/C0D7TNJHL/p1684255827991839
Copy code
file(
    name="downloaded-jq",
    source = http_source(
        len = 3953824,
        sha256 = "af986793a515d500ab2d35f8d2aecd656e764504b789b66d7e1a0b727a124c44",
        url = "<https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64>",
    ),
)
shell_command(
    name = "sandboxed-jq",
    command="chmod +x jq-linux64",
    tools = ["chmod"],
    execution_dependencies=[":downloaded-jq"],
    output_directories = ["."],
)
run_shell_command(
    name = "jq",
    command=f"{{chroot}}/{build_file_dir() / 'jq-linux64'}",
    execution_dependencies=[":sandboxed-jq"],
    workdir="/",
)
Run with:
$ pants run //:jq -- --help
yields usage:
Copy code
Usage:  /tmp/pants-sandbox-zLIAv5/3rdparty/tools/jq-linux64 [options] <jq filter> [file...]
        /tmp/pants-sandbox-zLIAv5/3rdparty/tools/jq-linux64 [options] --args <jq filter> [strings...]
        /tmp/pants-sandbox-zLIAv5/3rdparty/tools/jq-linux64 [options] --jsonargs <jq filter> [JSON_TEXTS...]
Pants version
main
OS Linux Additional info pantsbuild/pants