-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
environment variables are not parsed correctly #14381
Comments
While not too convenient, can you use |
I didn't know about |
I was not there and have no relevant context. |
Seems like I just stepped into quite a mess. 😆 |
Just wanted to note that we generally wanted to avoid any parsing of RUSTFLAGS. Over the years, we have introduced several alternatives (some documented here). Another alternative is to support TOML instead of shlex as suggested here. Although not a strong concern, I think it is worth being wary that shell quoting styles are not universal. The shlex docs themselves don't document the exact grammar that it supports. I'm also not convinced that it wouldn't be a breaking change to change the syntax for RUSTFLAGS. I am slightly inclined to close this as "won't fix" since there are several alternatives that already exist. |
We could specify which quotes are supported and what would be the end result. Because currently, this is an issue you discover randomly, which is pretty bad. |
Er, you may wish to amend your report given that currently you are technically reporting that "/home/somewhere/out" is a different string from `"/home/somewhere/out", which... is not the case and also not, I think, what you wanted to report. |
Oh indeed. I updated the issue. Thanks! |
Problem
RUSTFLAGS="--output '/home/somewhere/out file'" cargo doc
With this command, the
--output
command will receive/home/somewhere/out
and not/home/somewhere/out file
, which is problematicSteps
Add any flag with whitespace characters to environment variables.
Possible Solution(s)
Correctly parse arguments passed through environment variables.
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: