-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
Defining variables on the command line breaks for strings. #526
Comments
How about ? [env:myenv]
build_flags = '-DFOO="bar baz"' |
I don't want to specify it there because my goal is to release an open source repo without my secret keywords (WiFi password) in it. So, I added a build.sh to my gitignore that specifies these options on the command line so secrets won't leave my computer. Since this doesn't work, I'm forced to keep a public and a private version of a repo, which is cumbersome :-( |
Oh, sorry, you meant escaping the space. I'll try that soon, thank you! |
It should work. Please don't close this issue while we will not resolve it. Thanks. |
No :(
Looks like it happens even for things with no spaces, sorry for the mistaken report, but it's worse than I thought. |
If you can tell me where in the code this is handled, I can take a look at fixing it. |
Try
My output
|
That still doesn't work, but this does:
Wow. That is extremely convoluted. Is there any way PlatformIO command-line options for this could be simplified? |
Could you try please: |
That doesn't work, unfortunately. The compiler command line becomes |
@skorokithakis I'll look on it and fix from the PlatformIO's side |
Nope, this breaks integers:
A better fix would be to preserve whatever quotes are there, rather than indiscriminately add quotes everywhere. |
Except for the forgotten print statement, that worked, thanks! |
I did and they work, thanks! Just the print statement left to take out. |
I need to use
but
My environment
Tested project. Is there any configuration to reduce number of |
I tried to define a variable on the command line (a string), but while the
#define FOO "bar baz"
works fine in the code, I couldn't get it to work on the console (strings got split no matter what I tried).I can post a minimal example soon, but it's simple enough to reproduce, just take a string define out of the file and into the command line. If the define contains spaces, building will break.
The text was updated successfully, but these errors were encountered: