Streamline WSL distribution name

This commit is contained in:
Manuel Thalmann 2024-08-24 16:27:34 +02:00
parent a5f1f06ca0
commit b644b0f74c

View file

@ -166,6 +166,16 @@ $null = New-Module {
Copy-Item -Recurse -Force (Get-AppxPackage "*Ubuntu*").InstallLocation $wslLocation; Copy-Item -Recurse -Force (Get-AppxPackage "*Ubuntu*").InstallLocation $wslLocation;
Set-UserPermissions $wslLocation; Set-UserPermissions $wslLocation;
& "$wslLocation\ubuntu.exe" install --root; & "$wslLocation\ubuntu.exe" install --root;
wsl --shutdown;
& {
$tempDisk = New-TemporaryFile;
Move-Item $wslDisk $tempDisk;
wsl --deregister Ubuntu;
Move-Item $tempDisk $wslDisk;
wsl --import-in-place $distribution $wslDisk;
};
continue; continue;
} }