From e504d6a49081f8b4b3bf10920135713dc4328bea Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 15 Dec 2022 11:32:01 -0800 Subject: [PATCH] Update the regex to embrace more image names (#19705) Co-authored-by: sima-zhu --- eng/common/scripts/Verify-AgentOS.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Verify-AgentOS.ps1 b/eng/common/scripts/Verify-AgentOS.ps1 index 2a7edc4d05bb..3839553a0ff7 100644 --- a/eng/common/scripts/Verify-AgentOS.ps1 +++ b/eng/common/scripts/Verify-AgentOS.ps1 @@ -8,7 +8,7 @@ function Throw-InvalidOperatingSystem { throw "Invalid operating system detected. Operating system was: $([System.Runtime.InteropServices.RuntimeInformation]::OSDescription), expected image was: $AgentImage" } -if ($IsWindows -and $AgentImage -match "windows|win|MMS2019") { +if ($IsWindows -and $AgentImage -match "windows|win|MMS\d{4}") { $osName = "Windows" } elseif ($IsLinux -and $AgentImage -match "ubuntu") { $osName = "Linux"