-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support environment variables with empty value #103551
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
akoeplinger
reviewed
Jun 17, 2024
...m.Runtime/tests/System.Runtime.Extensions.Tests/System/Environment.SetEnvironmentVariable.cs
Show resolved
Hide resolved
Also fixes #34446 I assume? |
It does now - worth fixing for consistency. |
jkotas
commented
Jun 17, 2024
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs
Show resolved
Hide resolved
jkotas
added
the
breaking-change
Issue or PR that represents a breaking API or functional change over a prerelease.
label
Jun 17, 2024
dotnet-policy-service
bot
added
the
needs-breaking-change-doc-created
Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet
label
Jun 17, 2024
3 tasks
stephentoub
approved these changes
Jun 18, 2024
jkotas
changed the title
Support environment variables with no value
Support environment variables with empty value
Jun 18, 2024
Breaking change issue created: dotnet/docs#41471 |
/ba-g Known issue #103642 that has been fixed and closed already |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-System.Runtime
breaking-change
Issue or PR that represents a breaking API or functional change over a prerelease.
needs-breaking-change-doc-created
Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Environment.SetEnvironment
API did not make distinction between null and empty string value. It treated both as request to delete the environment variable. It made it impossible to create an environment variable with empty string value. This change updatesEnvironment.SetEnvironment
to treat empty string value as empty string value (null value is still treated as request to delete the environment variable).Also, this change updates ProcessStartInfo.Environment to treat null vs. empty string the same way as
Environment.SetEnvironment
for consistency.Fixes #50554
Fixes #34446