Skip to content

Commit e1f83b1

Browse files
authored
Merge pull request #2 from navanis/support-kafka
chore: fix WSL installation
2 parents 8abaadc + fc2ad27 commit e1f83b1

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/windows-plugin-test.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ jobs:
3838
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
3939
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
4040
41-
Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update.msi
42-
Start-Process msiexec.exe -Wait -ArgumentList '/i wsl_update.msi /quiet'
43-
4441
wsl --set-default-version 2
4542
wsl --update
46-
wsl --install -d Ubuntu
43+
44+
$distros = (Invoke-RestMethod -Uri https://raw.githubusercontent.com/microsoft/WSL/refs/heads/master/distributions/DistributionInfo.json).Distributions
45+
$distroDownloadUrl = $distros.Where({ $_.Name -eq 'Ubuntu' }).Amd64PackageUrl
46+
Set-Location $env:GITHUB_WORKSPACE\..\..
47+
$filename = "Ubuntu$([System.IO.Path]::GetExtension($distroDownloadUrl))"
48+
Invoke-WebRequest -Uri $distroDownloadUrl -OutFile $filename
49+
Expand-Archive -Path $filename -DestinationPath .\
50+
$distroExe = (Get-ChildItem -Path . -Filter *.exe).Where({ $_.Name -notmatch 'splash|setup' }).FullName
51+
& $distroExe install --root
4752
4853
@'
4954
@echo off

0 commit comments

Comments
 (0)