Add back WSL2_VM_ID environment varialbe to the system distro. (#13835)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
This commit is contained in:
Ben Hillis 2025-12-05 15:06:38 -08:00 committed by GitHub
parent caf38dcad2
commit 7741740f87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2258,7 +2258,16 @@ Return Value:
if (Value != nullptr)
{
Config.VmId = Value;
unsetenv(LX_WSL2_VM_ID_ENV);
//
// Unset the environment variable for user distros.
//
Value = getenv(LX_WSL2_SHARED_MEMORY_OB_DIRECTORY);
if (!Value)
{
unsetenv(LX_WSL2_VM_ID_ENV);
}
}
//