mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[Windows] Add WSL2 to Windows-2025 image (#11242)
This commit is contained in:
@@ -21,6 +21,9 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.VisualStudio.psm1") -Disa
|
||||
$softwareReport = [SoftwareReport]::new($(Build-OSInfoSection))
|
||||
$optionalFeatures = $softwareReport.Root.AddHeader("Windows features")
|
||||
$optionalFeatures.AddToolVersion("Windows Subsystem for Linux (WSLv1):", "Enabled")
|
||||
if (Test-IsWin25) {
|
||||
$optionalFeatures.AddToolVersion("Windows Subsystem for Linux (Default, WSLv2):", $(Get-WSL2Version))
|
||||
}
|
||||
$installedSoftware = $softwareReport.Root.AddHeader("Installed Software")
|
||||
|
||||
# Language and Runtime
|
||||
|
||||
@@ -318,3 +318,7 @@ function Get-ImageMagickVersion {
|
||||
function Get-MongoshVersion {
|
||||
return $(mongosh --version)
|
||||
}
|
||||
|
||||
function Get-WSL2Version {
|
||||
return $((Get-AppxPackage -Name "MicrosoftCorporationII.WindowsSubsystemForLinux").version)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user