-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow launcher_extra to split quoted values #444
Conversation
What if I want to pass to the launcher an argument that contains spaces? Say I want the final result to be something like:
|
Ah, I misunderstood your comment in chat... Yah that's a fly in the ointment. I am sure there are ways to accommodate this possibility but I'm not sure we'd want to inflict them on users. Do any of these sound appealing?
? that said are we sure that it even works now/before without extra quoting? I would expect
to render as
which would not work? If extra quoting is already necessary to make things work then we could try to make this PR more careful to not split quoted values |
Of the alternatives, this is the most palatable. I would be a little weary of writing a "quoted expression" parser from scratch, as there's a bunch of silly edge cases that we would need to handle, e.g.:
which should produce these final arguments: So it would be great if there's an existing "quoted expression" parser we can use, e.g. something in the standard library, or invoking a sub-shell.
Yes, it works today (in verbose mode you even quote the arguments!)
|
I would have to be back in undergrad CS to even dream of it :) I think stdlib |
@manopapad see the test in f201fdc I believe that is what we want. |
@manopapad FYI I think the quickstart
yields for me:
|
Yikes, despite my test, the actual output is wrong:
yields
🙄 |
OK, we were already calling
then
|
Actually, can we do the same for Also, can we note on the documentation for these two arguments that we split on whitespace, and the user will need to internally quote if they want to pass an argument that is meant to contain spaces? |
Otherwise works great!
|
@manopapad done in b47b864 |
This PR makes the driver automatically split
--launcher-extra
values on whitespace internally, Doing so allows for simpler invocations with quoted strings like this:rather than having to manually split across multiple
--launcher-extra
arguments as is currently required:cc @lightsighter