Skip to content

Commit

Permalink
Update the regex to embrace more image names (Azure#19705)
Browse files Browse the repository at this point in the history
Co-authored-by: sima-zhu <sizhu@microsoft.com>
  • Loading branch information
azure-sdk and sima-zhu authored Dec 15, 2022
1 parent 51c2003 commit e504d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/common/scripts/Verify-AgentOS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e504d6a

Please sign in to comment.