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

(#310) Fix issue with environment handling #3453

Conversation

vexx32
Copy link
Member

@vexx32 vexx32 commented May 24, 2024

Description Of Changes

  • Only return environment variable names that have an associated value from Get-EnvironmentVariableNames
  • When calling Update-SessionEnvironment, don't call SetVariable if the value at the queried scope is null.

Motivation and Context

  • .NET's registry handling seems to get value names around that have been set to null previously in the session, causing issues with the UpdateSession logic path.

Testing

Testing in test kitchen where we noticed the issue.

Operating Systems Testing

Windows Server 2016 & 2019

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

#310

- Only return environment variable names that have an associated value
from Get-EnvironmentVariableNames
- When calling Update-SessionEnvironment, don't call SetVariable if the
value at the queried scope is null.
@vexx32 vexx32 requested a review from corbob May 24, 2024 19:15
@gep13
Copy link
Member

gep13 commented May 30, 2024

@vexx32 @corbob am I right in saying that this PR is no longer required?

If so, let's go ahead and close it out.

@gep13
Copy link
Member

gep13 commented May 30, 2024

As discussed in a Zoom call, this PR is no longer required.

@gep13 gep13 closed this May 30, 2024
@vexx32 vexx32 deleted the avoid-nulling-out-environment-stuff branch July 8, 2024 14:26
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