respect go.mod replace

This commit is contained in:
nikk gitanes
2023-03-12 13:07:43 +03:00
parent 497a8f0dc7
commit 8c6a128200

View File

@@ -17,7 +17,11 @@ func GetTorrentVersion() string {
}
for _, dep := range bi.Deps {
if dep.Path == "github.com/anacrolix/torrent" {
return dep.Version
if dep.Replace != nil {
return dep.Replace.Version
} else {
return dep.Version
}
}
}
return ""