cargo
cargo copied to clipboard
Correctly parse arguments from environment variables
Fixes https://github.com/rust-lang/cargo/issues/14381.
The current parsing doesn't correctly handle arguments like --x="y z". To be noted: if you don't want the dependency, I can write a parser by hand too, shouldn't take many lines of code to do.
r? @epage
I'm unsure what the compatibility guarantees are around this. @ehuss if you have any insight, it'd be appreciated.
In general, we recommend starting with an issue. That way we make sure we are all on the same page (e.g. the definition of the problem in this PR is unclear) and, if we go through multiple possible PRs for the problem (which is common enough), the conversation on the problem and solution space is centralized rather than split among all of the PRs.
I opened https://github.com/rust-lang/cargo/issues/14381 too.
:umbrella: The latest upstream changes (possibly 39399182abe219c04f3631e0fb5e22cbebdc5f83) made this pull request unmergeable. Please resolve the merge conflicts.
I'm going to close as this is unlikely the direction that we want to go. Using shlex as-is would be a breaking change (for example a\b would be interpreted differently). If we do decide on some direction, that discussion will likely happen on https://github.com/rust-lang/cargo/issues/14381.