Skip to content

Commit fbcb5e6

Browse files
committed
select first
1 parent dcb3fe2 commit fbcb5e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

updater/scripts/update-dependency.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ if ("$Tag" -eq '') {
162162
if ("$headRef" -eq '') {
163163
throw "Couldn't determine repository head (no ref returned by ls-remote HEAD"
164164
}
165-
$mainBranch = (git ls-remote --heads $url | Where-Object { $_.StartsWith($headRef) }) -replace '.*\srefs/heads/', ''
165+
$mainBranch = (git ls-remote --heads $url | Where-Object { $_.StartsWith($headRef) } | Select-Object -First 1) -replace '.*\srefs/heads/', ''
166166
}
167167

168168
$url = $url -replace '\.git$', ''

updater/tests/update-dependency.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ switch ($action)
220220
$output | Should -Contain 'latestTag=0.28.0'
221221
$output | Should -Contain 'latestTagNice=v0.28.0'
222222
$output | Should -Contain 'url=https://github.com/getsentry/sentry-cli'
223-
$output | Should -Contain 'mainBranch=main master'
223+
$output | Should -Contain 'mainBranch=main'
224224
}
225225
}
226226

0 commit comments

Comments
 (0)