-
Notifications
You must be signed in to change notification settings - Fork 981
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
Fix extra spaces and colons in flags and environment variables #8496
Fix extra spaces and colons in flags and environment variables #8496
Conversation
According to [Bash expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html): ${parameter:+word} Correct form for PATH: ${PATH:+:$PATH} Correct form for CFLAGS: ${CFLAGS:+ $CFLAGS} Fixes conan-io#8495
67c715a
to
09db3af
Compare
67c715a
to
370adbf
Compare
@jgsogo, @memsharded FYI |
Thanks for contributing this @klimkin I am a bit surprised that our tests didn't catch such bug. I am experimenting with a new way to handle the environment in #8426, and I haven't been able to reproduce, it seems that modern bash can process the expansion correctly without the I think this is most likely good to be merged, if it is the "canonical" way, but it would be great to have also first a failing test that proves that the current expansion without ":" doesn't work as intended. Could you please try to contribute such a test, or give some hints about the failures that could happen if the ":" is missing? |
Added unit-test: e64fee7 @memsharded Here is a nice write-up: https://tldp.org/LDP/abs/html/parameter-substitution.html
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love to see all those FIXME
being actually fixed! 💯
Co-authored-by: Javier G. Sogo <[email protected]>
According to Bash expansion:
Correct form for PATH:
Correct form for CFLAGS:
Fixes #8495
Changelog: Fix: Remove extra spaces in flags and colons in path variables.
Docs: omit
develop
branch, documenting this one.