From 715747a0548ee00d549950b7790c14d5f7154d64 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 27 Oct 2022 09:26:49 +0200 Subject: [PATCH] Remove Test-IsWin19 WSL condition (#6477) --- .../SoftwareReport/SoftwareReport.Generator.ps1 | 11 ++++------- images/win/scripts/Tests/Shell.Tests.ps1 | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2decc97cf..7d5138d3d 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -26,13 +26,10 @@ $markdown += New-MDList -Style Unordered -Lines @( "Image Version: $env:IMAGE_VERSION" ) -if ((Test-IsWin19) -or (Test-IsWin22)) -{ - $markdown += New-MDHeader "Enabled windows optional features" -Level 2 - $markdown += New-MDList -Style Unordered -Lines @( - "Windows Subsystem for Linux [WSLv1]" - ) -} +$markdown += New-MDHeader "Enabled windows optional features" -Level 2 +$markdown += New-MDList -Style Unordered -Lines @( + "Windows Subsystem for Linux [WSLv1]" +) $markdown += New-MDHeader "Installed Software" -Level 2 $markdown += New-MDHeader "Language and Runtime" -Level 3 diff --git a/images/win/scripts/Tests/Shell.Tests.ps1 b/images/win/scripts/Tests/Shell.Tests.ps1 index 8809597f2..caddaf7fb 100644 --- a/images/win/scripts/Tests/Shell.Tests.ps1 +++ b/images/win/scripts/Tests/Shell.Tests.ps1 @@ -2,10 +2,8 @@ Describe "Shell" { $shellTestCases = @( @{Name = "C:\shells\gitbash.exe"; Target = "$env:ProgramFiles\Git\bin\bash.exe"}, @{Name = "C:\shells\msys2bash.cmd"; Target = $null} + @{Name = "C:\shells\wslbash.exe"; Target = "$env:SystemRoot\System32\bash.exe"} ) - if (Test-IsWin19) { - $shellTestCases += @{Name = "C:\shells\wslbash.exe"; Target = "$env:SystemRoot\System32\bash.exe"} - } It " target to " -TestCases $shellTestCases { (Get-Item $Name).Target | Should -BeExactly $Target