Skip to content

Hide Windows magic environment values from ProcessInfo.environment #853

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

Conversation

iCharlesHu
Copy link
Contributor

Windows GetEnvironmentStringsW API can return magic environment variables set by the cmd shell that starts with "=". We should hide these values to avoid surprising behavior.

resolves: #847

@iCharlesHu iCharlesHu requested a review from jmschonfeld August 14, 2024 23:52
@iCharlesHu iCharlesHu marked this pull request as ready for review August 14, 2024 23:52
@iCharlesHu
Copy link
Contributor Author

@swift-ci please test

Windows GetEnvironmentStringsW API can return magic environment variables set by the cmd shell that starts with "=". We should hide these values to avoid surprising behavior.

resolves: swiftlang#847
@iCharlesHu iCharlesHu force-pushed the charles/process-info-environment-windows-fix branch from 6cb4c17 to b8e771a Compare August 15, 2024 05:51
@iCharlesHu
Copy link
Contributor Author

Addressed Jeremy's comments.

@iCharlesHu
Copy link
Contributor Author

@swift-ci please test

@iCharlesHu iCharlesHu merged commit dc49e15 into swiftlang:main Aug 15, 2024
3 checks passed
@iCharlesHu iCharlesHu deleted the charles/process-info-environment-windows-fix branch August 15, 2024 17:47
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
…wiftlang#853)

Windows GetEnvironmentStringsW API can return magic environment variables set by the cmd shell that starts with "=". We should hide these values to avoid surprising behavior.

resolves: swiftlang#847
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.

ProcessInfo.processInfo.environment returns magic shell environment vars which aren't valid
2 participants