Prover package: strip the UTF-16 nulls from the WSL distro list so an installed Ubuntu is detected
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
51e1330233
commit
e5c7f3d0ef
1 changed files with 2 additions and 1 deletions
|
|
@ -20,7 +20,8 @@ if ($nv) { Write-Host 'NVIDIA driver on Windows:'; & nvidia-smi --query-gpu=name
|
|||
|
||||
# Is the distro already installed?
|
||||
$installed = $false
|
||||
try { $list = (& wsl.exe --list --quiet 2>$null) -join "`n"; if ($list -match 'Ubuntu-24\.04') { $installed = $true } } catch {}
|
||||
try { $list = ((& wsl.exe --list --quiet 2>$null) -join "`n") -replace "`0", ""; if ($list -match "Ubuntu-24\.04") { $installed = $true } } catch {}
|
||||
# (wsl.exe prints UTF-16; without the null strip PowerShell 5 never matches the name and step A repeats with ERROR_ALREADY_EXISTS.)
|
||||
|
||||
if (-not $installed) {
|
||||
Write-Host "Step A: enabling WSL2 and installing $distro (download about 400 MB, approximate)."
|
||||
|
|
|
|||
Loading…
Reference in a new issue