diff --git a/eng/common/scripts/Cadl-Project-Sync.ps1 b/eng/common/scripts/Cadl-Project-Sync.ps1 index 79527b5b11cd..c6e8cf5ce531 100644 --- a/eng/common/scripts/Cadl-Project-Sync.ps1 +++ b/eng/common/scripts/Cadl-Project-Sync.ps1 @@ -44,10 +44,10 @@ function GetGitRemoteValue([string]$repo) { $gitRemotes = (git remote -v) foreach ($remote in $gitRemotes) { if ($remote.StartsWith("origin")) { - if ($remote -match 'https://github.com/\S+[\.git]') { + if ($remote -match 'https://github.com/\S+') { $result = "https://github.com/$repo.git" break - } elseif ($remote -match "git@github.com:\S+[\.git]"){ + } elseif ($remote -match "git@github.com:\S+"){ $result = "git@github.com:$repo.git" break } else {