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

std: Fix env() assert when an environment variable's value contains a '=' char #1863

Closed
wants to merge 2 commits into from

Conversation

cpeterso
Copy link
Contributor

This patch fixes a rust build error from env() assertion failures.

MingW on Windows seems to set some funky environment variables like "=C:=C:\MinGW\msys\1.0\bin" and "!::=::" that cause some assertion failures when trying to build rust. Some of the environment variables may contain '=' chars in their value or even their name!

This small patch avoids the assertion failure. I chose not to hide or sanitize these funky environment variables because they do exist in the system environment. I am also lazy.

@marijnh
Copy link
Contributor

marijnh commented Feb 17, 2012

Thank you. Merged.

@marijnh marijnh closed this Feb 17, 2012
celinval pushed a commit to celinval/rust-dev that referenced this pull request Jun 4, 2024
Kobzol pushed a commit to Kobzol/rust that referenced this pull request Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants