Update the regex to embrace more image names (#4190)

Co-authored-by: sima-zhu <sizhu@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-12-15 11:31:59 -08:00 committed by GitHub
parent 111776e6af
commit ceeda9c7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"