just ran into this on 2.2, we were trying to do a ...
# general
h
just ran into this on 2.2, we were trying to do a
pants run path/to/binary -- binary’s arguments
. Now the binary’s arguments happened to have brackets
[]
in them and pants was aborting with:
Copy code
File "/Users/nate/.cache/pants/setup/bootstrap-Darwin-x86_64/2.2.0_py38/lib/python3.8/site-packages/pants/util/eval.py", line 47, in parse_expression
    raise raise_type(
pants.option.errors.ParseError: The value cannot be evaluated as a literal expression: SyntaxError('unexpected EOF while parsing', ('<string>', 1, 8, '[test] quoting'))
Given raw value:
1: [test] quoting
In v1 we made heavy use of pants run with
--
expecting pants to stop processing argv after that. I tried looking at
--run-args
but it seems that the brackets still cause it to bail.
e
That sounds like a good straight up bug. Do you mind filing an issue?
h
will do
h
Thanks for reporting. I followed up on the ticket.
h
yah i’ll try to come up with a more complete example
e
Gotcha there Nate, the Pants repo itself had a good example.
Benjy has a workaround on the ticket, but it's a regression from Pants v1.x and probably not what the status quo should be.
h
yah i replied because i think the workaround only works if the brackets aren’t the start of argv
i posted that on the ticket
for now we’ve just backslash escaped our brackets with a simple regex so we can wait
h
Sorry for the trouble, and thanks for the bug report! We'll get a fix out soon
💯 1
w
metal 1