Skip to content
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

Can't include quoted strings in --build-properties args #1037

Closed
obra opened this issue Oct 19, 2020 · 0 comments · Fixed by #1044
Closed

Can't include quoted strings in --build-properties args #1037

obra opened this issue Oct 19, 2020 · 0 comments · Fixed by #1044

Comments

@obra
Copy link
Contributor

obra commented Oct 19, 2020

I'm clearly doing something wrong, but I'm having a heck of a time figuring out how arduino-cli wants me to escape strings containing " marks in values passed to --build-properties.

A slightly cut down example:

$ export LOCAL_CFLAGS='"-I/tmp/x" "-I/tmp/y"'

$ arduino-cli compile --fqbn my:valid:fqbn --build-properties "compiler.cpp.extra_flags=$LOCAL_CFLAGS" Sketch.ino

Gets me:

Error: invalid argument "compiler.cpp.extra_flags= "-I/tmp/x" "-I/tmp/y"" for "--build-properties" flag: parse error on line 1, column 26: bare " in non-quoted-field

I've been through just about every permutation I can think of, but can't figure out the correct escaping to be able to pass a string containing a double-quote in as a value for --build-properties.

A search of github issues for arduino-cli doesn't seem to turn up anyone else who's run into this, which leads me to suggest that I'm just missing something really obvious.

Currently testing against arduino-cli v0.13 and v0.11 on macOS and Linux.

I initially reported this as https://forum.arduino.cc/index.php?topic=709766.msg4769079#msg4769079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants