fix: updateURL when customURL is not passed (#4279)

This commit is contained in:
Harshavardhana
2022-10-03 15:00:41 -07:00
committed by GitHub
parent 68ca2bf457
commit a7dd2810ae
+5 -1
View File
@@ -320,9 +320,13 @@ func getDownloadURL(customReleaseURL string, releaseTag string) (downloadURL str
return fmt.Sprintf("docker pull minio/mc:%s", releaseTag)
}
if customReleaseURL == "" {
return mcReleaseURL + "archive/mc." + releaseTag
}
u, err := url.Parse(customReleaseURL)
if err != nil {
return mcReleaseURL + "archive/" + "mc." + releaseTag
return mcReleaseURL + "archive/mc." + releaseTag
}
u.Path = path.Dir(u.Path) + "/mc." + releaseTag