Fix git ls-remote parsing
This commit is contained in:
parent
ff82fc2536
commit
4332fb45cb
1 changed files with 4 additions and 2 deletions
|
|
@ -91,8 +91,10 @@ proc getTagsListRemote*(url: string, meth: DownloadMethod): seq[string] =
|
|||
raise newException(OSError, "Unable to query remote tags for " & url &
|
||||
". Git returned: " & output)
|
||||
for i in output.splitLines():
|
||||
if i == "": continue
|
||||
let start = i.find("refs/tags/")+"refs/tags/".len
|
||||
let refStart = i.find("refs/tags/")
|
||||
# git outputs warnings, empty lines, etc
|
||||
if refStart == -1: continue
|
||||
let start = refStart+"refs/tags/".len
|
||||
let tag = i[start .. i.len-1]
|
||||
if not tag.endswith("^{}"): result.add(tag)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue