mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-13 20:02:57 +08:00
downloader
This commit is contained in:
parent
592d28044e
commit
140cd538b5
@ -104,20 +104,13 @@ suspend fun HttpClient.downloadMavenPomAsString(
|
||||
version: String
|
||||
):String{
|
||||
return kotlin.runCatching {
|
||||
Http.get<String>(
|
||||
this.get<String>(
|
||||
aliyunPath.buildPath(groupName,projectName,version,"pom")
|
||||
)
|
||||
}.getOrElse {
|
||||
try {
|
||||
Http.get(
|
||||
aliyunPath.buildPath(groupName, projectName, version, "pom")
|
||||
)
|
||||
}catch (e:Exception){
|
||||
if(e.message?.contains("404 Not Found") == true) {
|
||||
return ""
|
||||
}
|
||||
throw e
|
||||
}
|
||||
this.get(
|
||||
aliyunPath.buildPath(groupName, projectName, version, "pom")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user